You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2020/12/23 06:32:29 UTC

[GitHub] [shardingsphere] jingshanglu opened a new pull request #8729: add example for sql format and parameterize

jingshanglu opened a new pull request #8729:
URL: https://github.com/apache/shardingsphere/pull/8729


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] terrymanu commented on a change in pull request #8729: add example for sql format and parameterize

Posted by GitBox <gi...@apache.org>.
terrymanu commented on a change in pull request #8729:
URL: https://github.com/apache/shardingsphere/pull/8729#discussion_r547911676



##########
File path: examples/Shardingsphere-parser-example/src/main/java/org/apache/shardingsphere/example/parser/SqlFormatExampleMain.java
##########
@@ -0,0 +1,37 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.example.parser;
+
+import org.antlr.v4.runtime.tree.ParseTree;
+import org.apache.shardingsphere.sql.parser.api.SQLParserEngine;
+import org.apache.shardingsphere.sql.parser.api.SQLVisitorEngine;
+
+import java.util.Properties;
+
+public class SqlFormatExampleMain {

Review comment:
       SqlFormatExampleMain should rename to `SQLFormatExampleMain`

##########
File path: examples/Shardingsphere-parser-example/src/main/java/org/apache/shardingsphere/example/parser/SqlFormatExampleMain.java
##########
@@ -0,0 +1,37 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.example.parser;
+
+import org.antlr.v4.runtime.tree.ParseTree;
+import org.apache.shardingsphere.sql.parser.api.SQLParserEngine;
+import org.apache.shardingsphere.sql.parser.api.SQLVisitorEngine;
+
+import java.util.Properties;
+
+public class SqlFormatExampleMain {
+    public static void main(String[] args) {

Review comment:
       Please keep a blank line between class definition and first method




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] terrymanu merged pull request #8729: add example for sql format and parameterize

Posted by GitBox <gi...@apache.org>.
terrymanu merged pull request #8729:
URL: https://github.com/apache/shardingsphere/pull/8729


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] codecov-io commented on pull request #8729: add example for sql format and parameterize

Posted by GitBox <gi...@apache.org>.
codecov-io commented on pull request #8729:
URL: https://github.com/apache/shardingsphere/pull/8729#issuecomment-749989122


   # [Codecov](https://codecov.io/gh/apache/shardingsphere/pull/8729?src=pr&el=h1) Report
   > Merging [#8729](https://codecov.io/gh/apache/shardingsphere/pull/8729?src=pr&el=desc) (c6594dd) into [master](https://codecov.io/gh/apache/shardingsphere/commit/c69a4a685fba141cf292f58d6d41c1aeae88b5b3?el=desc) (c69a4a6) will **decrease** coverage by `0.30%`.
   > The diff coverage is `n/a`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/shardingsphere/pull/8729/graphs/tree.svg?width=650&height=150&src=pr&token=ZvlXpWa7so)](https://codecov.io/gh/apache/shardingsphere/pull/8729?src=pr&el=tree)
   
   ```diff
   @@             Coverage Diff              @@
   ##             master    #8729      +/-   ##
   ============================================
   - Coverage     71.03%   70.72%   -0.31%     
     Complexity      623      623              
   ============================================
     Files          1572     1578       +6     
     Lines         25164    25257      +93     
     Branches       4173     4415     +242     
   ============================================
   - Hits          17874    17862      -12     
   - Misses         6114     6204      +90     
   - Partials       1176     1191      +15     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/shardingsphere/pull/8729?src=pr&el=tree) | Coverage Δ | Complexity Δ | |
   |---|---|---|---|
   | [...rdingsphere/agent/metrics/api/MetricsProvider.java](https://codecov.io/gh/apache/shardingsphere/pull/8729/diff?src=pr&el=tree#diff-c2hhcmRpbmdzcGhlcmUtYWdlbnQvc2hhcmRpbmdzcGhlcmUtYWdlbnQtcGx1Z2lucy9zaGFyZGluZ3NwaGVyZS1hZ2VudC1wbHVnaW4tbWV0cmljcy9zaGFyZGluZ3NwaGVyZS1hZ2VudC1tZXRyaWNzLWFwaS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvYWdlbnQvbWV0cmljcy9hcGkvTWV0cmljc1Byb3ZpZGVyLmphdmE=) | `0.00% <0.00%> (-100.00%)` | `0.00% <0.00%> (ø%)` | |
   | [...re/agent/core/config/AgentConfigurationLoader.java](https://codecov.io/gh/apache/shardingsphere/pull/8729/diff?src=pr&el=tree#diff-c2hhcmRpbmdzcGhlcmUtYWdlbnQvc2hhcmRpbmdzcGhlcmUtYWdlbnQtY29yZS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvYWdlbnQvY29yZS9jb25maWcvQWdlbnRDb25maWd1cmF0aW9uTG9hZGVyLmphdmE=) | `0.00% <0.00%> (-83.34%)` | `0.00% <0.00%> (ø%)` | |
   | [...r/sql/common/segment/dml/column/ColumnSegment.java](https://codecov.io/gh/apache/shardingsphere/pull/8729/diff?src=pr&el=tree#diff-c2hhcmRpbmdzcGhlcmUtc3FsLXBhcnNlci9zaGFyZGluZ3NwaGVyZS1zcWwtcGFyc2VyLXN0YXRlbWVudC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvc3FsL3BhcnNlci9zcWwvY29tbW9uL3NlZ21lbnQvZG1sL2NvbHVtbi9Db2x1bW5TZWdtZW50LmphdmE=) | `33.33% <0.00%> (-41.67%)` | `0.00% <0.00%> (ø%)` | |
   | [...ere/scaling/core/utils/RdbmsConfigurationUtil.java](https://codecov.io/gh/apache/shardingsphere/pull/8729/diff?src=pr&el=tree#diff-c2hhcmRpbmdzcGhlcmUtc2NhbGluZy9zaGFyZGluZ3NwaGVyZS1zY2FsaW5nLWNvcmUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NoYXJkaW5nc3BoZXJlL3NjYWxpbmcvY29yZS91dGlscy9SZGJtc0NvbmZpZ3VyYXRpb25VdGlsLmphdmE=) | `40.00% <0.00%> (-40.00%)` | `0.00% <0.00%> (ø%)` | |
   | [...che/shardingsphere/agent/core/yaml/YamlEngine.java](https://codecov.io/gh/apache/shardingsphere/pull/8729/diff?src=pr&el=tree#diff-c2hhcmRpbmdzcGhlcmUtYWdlbnQvc2hhcmRpbmdzcGhlcmUtYWdlbnQtY29yZS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvYWdlbnQvY29yZS95YW1sL1lhbWxFbmdpbmUuamF2YQ==) | `0.00% <0.00%> (-36.37%)` | `0.00% <0.00%> (ø%)` | |
   | [...i/prometheus/PrometheusMetricsRegisterFactory.java](https://codecov.io/gh/apache/shardingsphere/pull/8729/diff?src=pr&el=tree#diff-c2hhcmRpbmdzcGhlcmUtYWdlbnQvc2hhcmRpbmdzcGhlcmUtYWdlbnQtcGx1Z2lucy9zaGFyZGluZ3NwaGVyZS1hZ2VudC1wbHVnaW4tbWV0cmljcy9zaGFyZGluZ3NwaGVyZS1hZ2VudC1tZXRyaWNzLWFwaS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvYWdlbnQvbWV0cmljcy9hcGkvcHJvbWV0aGV1cy9Qcm9tZXRoZXVzTWV0cmljc1JlZ2lzdGVyRmFjdG9yeS5qYXZh) | `0.00% <0.00%> (-33.34%)` | `0.00% <0.00%> (-1.00%)` | |
   | [...rdingsphere/proxy/database/DatabaseServerInfo.java](https://codecov.io/gh/apache/shardingsphere/pull/8729/diff?src=pr&el=tree#diff-c2hhcmRpbmdzcGhlcmUtcHJveHkvc2hhcmRpbmdzcGhlcmUtcHJveHktYm9vdHN0cmFwL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9zaGFyZGluZ3NwaGVyZS9wcm94eS9kYXRhYmFzZS9EYXRhYmFzZVNlcnZlckluZm8uamF2YQ==) | `90.00% <0.00%> (-10.00%)` | `0.00% <0.00%> (ø%)` | |
   | [...re/execute/executor/dumper/AbstractJDBCDumper.java](https://codecov.io/gh/apache/shardingsphere/pull/8729/diff?src=pr&el=tree#diff-c2hhcmRpbmdzcGhlcmUtc2NhbGluZy9zaGFyZGluZ3NwaGVyZS1zY2FsaW5nLWNvcmUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NoYXJkaW5nc3BoZXJlL3NjYWxpbmcvY29yZS9leGVjdXRlL2V4ZWN1dG9yL2R1bXBlci9BYnN0cmFjdEpEQkNEdW1wZXIuamF2YQ==) | `83.33% <0.00%> (-7.15%)` | `0.00% <0.00%> (ø%)` | |
   | [.../text/sctl/show/ShardingCTLShowBackendHandler.java](https://codecov.io/gh/apache/shardingsphere/pull/8729/diff?src=pr&el=tree#diff-c2hhcmRpbmdzcGhlcmUtcHJveHkvc2hhcmRpbmdzcGhlcmUtcHJveHktYmFja2VuZC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvcHJveHkvYmFja2VuZC90ZXh0L3NjdGwvc2hvdy9TaGFyZGluZ0NUTFNob3dCYWNrZW5kSGFuZGxlci5qYXZh) | `86.66% <0.00%> (-6.67%)` | `0.00% <0.00%> (ø%)` | |
   | [...ext/transaction/GovernanceTransactionContexts.java](https://codecov.io/gh/apache/shardingsphere/pull/8729/diff?src=pr&el=tree#diff-c2hhcmRpbmdzcGhlcmUtZ292ZXJuYW5jZS9zaGFyZGluZ3NwaGVyZS1nb3Zlcm5hbmNlLWNvbnRleHQvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NoYXJkaW5nc3BoZXJlL2dvdmVybmFuY2UvY29udGV4dC90cmFuc2FjdGlvbi9Hb3Zlcm5hbmNlVHJhbnNhY3Rpb25Db250ZXh0cy5qYXZh) | `93.75% <0.00%> (-6.25%)` | `0.00% <0.00%> (ø%)` | |
   | ... and [53 more](https://codecov.io/gh/apache/shardingsphere/pull/8729/diff?src=pr&el=tree-more) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/shardingsphere/pull/8729?src=pr&el=continue).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/shardingsphere/pull/8729?src=pr&el=footer). Last update [c69a4a6...c6594dd](https://codecov.io/gh/apache/shardingsphere/pull/8729?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org