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 2022/11/16 06:19:11 UTC

[GitHub] [shardingsphere] Qianyi951015 opened a new pull request, #22201: Update Oracle DML SLELECT DatetimeExpression statement parse

Qianyi951015 opened a new pull request, #22201:
URL: https://github.com/apache/shardingsphere/pull/22201

   Fixes #22199 .
   
   Ref: https://docs.oracle.com/en/database/oracle/oracle-database/12.2/sqlrf/Datetime-Expressions.html#GUID-F72A753A-98A4-4EBD-84E9-C014CE058384
   
   <img width="750" alt="image" src="https://user-images.githubusercontent.com/57847965/202099546-aa347ed0-56c0-4310-be94-724ab0406f67.png">
   
   
   ---
   
   Before committing this PR, I'm sure that I have checked the following options:
   - [x] My code follows the [code of conduct](https://shardingsphere.apache.org/community/en/involved/conduct/code/) of this project.
   - [x] I have self-reviewed the commit code.
   - [ ] I have (or in comment I request) added corresponding labels for the pull request.
   - [x] I have passed maven check locally : `./mvnw clean install -B -T1C -Dmaven.javadoc.skip -Dmaven.jacoco.skip -e`.
   - [ ] I have made corresponding changes to the documentation.
   - [x] I have added corresponding unit tests for my changes.
   


-- 
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.

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

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


[GitHub] [shardingsphere] codecov-commenter commented on pull request #22201: Update Oracle DML SLELECT DatetimeExpression statement parse

Posted by GitBox <gi...@apache.org>.
codecov-commenter commented on PR #22201:
URL: https://github.com/apache/shardingsphere/pull/22201#issuecomment-1316538439

   # [Codecov](https://codecov.io/gh/apache/shardingsphere/pull/22201?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#22201](https://codecov.io/gh/apache/shardingsphere/pull/22201?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (37f9a25) into [master](https://codecov.io/gh/apache/shardingsphere/commit/3719f6e5c8a52b08aa09c74b28c346422f2386d4?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (3719f6e) will **decrease** coverage by `0.01%`.
   > The diff coverage is `27.27%`.
   
   ```diff
   @@             Coverage Diff              @@
   ##             master   #22201      +/-   ##
   ============================================
   - Coverage     60.98%   60.97%   -0.02%     
     Complexity     2548     2548              
   ============================================
     Files          4124     4127       +3     
     Lines         57467    57509      +42     
     Branches       9734     9737       +3     
   ============================================
   + Hits          35049    35067      +18     
   - Misses        19456    19478      +22     
   - Partials       2962     2964       +2     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/shardingsphere/pull/22201?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [...ql/common/segment/dml/expr/DatetimeExpression.java](https://codecov.io/gh/apache/shardingsphere/pull/22201/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3FsLXBhcnNlci9zdGF0ZW1lbnQvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NoYXJkaW5nc3BoZXJlL3NxbC9wYXJzZXIvc3FsL2NvbW1vbi9zZWdtZW50L2RtbC9leHByL0RhdGV0aW1lRXhwcmVzc2lvbi5qYXZh) | `0.00% <0.00%> (ø)` | |
   | [...on/segment/dml/item/DatetimeProjectionSegment.java](https://codecov.io/gh/apache/shardingsphere/pull/22201/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3FsLXBhcnNlci9zdGF0ZW1lbnQvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NoYXJkaW5nc3BoZXJlL3NxbC9wYXJzZXIvc3FsL2NvbW1vbi9zZWdtZW50L2RtbC9pdGVtL0RhdGV0aW1lUHJvamVjdGlvblNlZ21lbnQuamF2YQ==) | `0.00% <0.00%> (ø)` | |
   | [...r/statement/impl/OracleDMLStatementSQLVisitor.java](https://codecov.io/gh/apache/shardingsphere/pull/22201/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3FsLXBhcnNlci9kaWFsZWN0L29yYWNsZS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvc3FsL3BhcnNlci9vcmFjbGUvdmlzaXRvci9zdGF0ZW1lbnQvaW1wbC9PcmFjbGVETUxTdGF0ZW1lbnRTUUxWaXNpdG9yLmphdmE=) | `77.69% <66.66%> (-0.12%)` | :arrow_down: |
   | [...itor/statement/impl/OracleStatementSQLVisitor.java](https://codecov.io/gh/apache/shardingsphere/pull/22201/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3FsLXBhcnNlci9kaWFsZWN0L29yYWNsZS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvc3FsL3BhcnNlci9vcmFjbGUvdmlzaXRvci9zdGF0ZW1lbnQvaW1wbC9PcmFjbGVTdGF0ZW1lbnRTUUxWaXNpdG9yLmphdmE=) | `72.36% <80.00%> (+0.28%)` | :arrow_up: |
   | [...iscovery/rule/DatabaseDiscoveryDataSourceRule.java](https://codecov.io/gh/apache/shardingsphere/pull/22201/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZmVhdHVyZXMvZGItZGlzY292ZXJ5L2NvcmUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NoYXJkaW5nc3BoZXJlL2RiZGlzY292ZXJ5L3J1bGUvRGF0YWJhc2VEaXNjb3ZlcnlEYXRhU291cmNlUnVsZS5qYXZh) | `78.57% <0.00%> (-0.74%)` | :arrow_down: |
   | [...re/data/pipeline/core/job/AbstractPipelineJob.java](https://codecov.io/gh/apache/shardingsphere/pull/22201/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-a2VybmVsL2RhdGEtcGlwZWxpbmUvY29yZS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvZGF0YS9waXBlbGluZS9jb3JlL2pvYi9BYnN0cmFjdFBpcGVsaW5lSm9iLmphdmE=) | `0.00% <0.00%> (ø)` | |
   | [...line/core/api/impl/AbstractPipelineJobAPIImpl.java](https://codecov.io/gh/apache/shardingsphere/pull/22201/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-a2VybmVsL2RhdGEtcGlwZWxpbmUvY29yZS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvZGF0YS9waXBlbGluZS9jb3JlL2FwaS9pbXBsL0Fic3RyYWN0UGlwZWxpbmVKb2JBUElJbXBsLmphdmE=) | `0.00% <0.00%> (ø)` | |
   | [...ion/MigrationChangedJobConfigurationProcessor.java](https://codecov.io/gh/apache/shardingsphere/pull/22201/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-a2VybmVsL2RhdGEtcGlwZWxpbmUvY29yZS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvZGF0YS9waXBlbGluZS9zY2VuYXJpby9taWdyYXRpb24vTWlncmF0aW9uQ2hhbmdlZEpvYkNvbmZpZ3VyYXRpb25Qcm9jZXNzb3IuamF2YQ==) | `0.00% <0.00%> (ø)` | |
   | [...sistencyCheckChangedJobConfigurationProcessor.java](https://codecov.io/gh/apache/shardingsphere/pull/22201/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-a2VybmVsL2RhdGEtcGlwZWxpbmUvY29yZS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvZGF0YS9waXBlbGluZS9zY2VuYXJpby9jb25zaXN0ZW5jeWNoZWNrL0NvbnNpc3RlbmN5Q2hlY2tDaGFuZ2VkSm9iQ29uZmlndXJhdGlvblByb2Nlc3Nvci5qYXZh) | `0.00% <0.00%> (ø)` | |
   | [...pipeline/core/util/PipelineDistributedBarrier.java](https://codecov.io/gh/apache/shardingsphere/pull/22201/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-a2VybmVsL2RhdGEtcGlwZWxpbmUvY29yZS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvZGF0YS9waXBlbGluZS9jb3JlL3V0aWwvUGlwZWxpbmVEaXN0cmlidXRlZEJhcnJpZXIuamF2YQ==) | | |
   | ... and [5 more](https://codecov.io/gh/apache/shardingsphere/pull/22201/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
   
   :mega: We’re building smart automated test selection to slash your CI/CD build times. [Learn more](https://about.codecov.io/iterative-testing/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   


-- 
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.

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

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


[GitHub] [shardingsphere] RaigorJiang commented on a diff in pull request #22201: Update Oracle DML SLELECT DatetimeExpression statement parse

Posted by GitBox <gi...@apache.org>.
RaigorJiang commented on code in PR #22201:
URL: https://github.com/apache/shardingsphere/pull/22201#discussion_r1023642395


##########
sql-parser/statement/src/main/java/org/apache/shardingsphere/sql/parser/sql/common/segment/dml/item/DatetimeProjectionSegment.java:
##########
@@ -0,0 +1,58 @@
+/*
+ * 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.sql.parser.sql.common.segment.dml.item;
+
+import lombok.Getter;
+import lombok.Setter;
+import lombok.ToString;
+import org.apache.shardingsphere.sql.parser.sql.common.segment.dml.expr.ExpressionSegment;
+
+/**
+ * Column projection segment.

Review Comment:
   Comment does not match the class name.



-- 
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.

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

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


[GitHub] [shardingsphere] RaigorJiang merged pull request #22201: Update Oracle DML SLELECT DatetimeExpression statement parse

Posted by GitBox <gi...@apache.org>.
RaigorJiang merged PR #22201:
URL: https://github.com/apache/shardingsphere/pull/22201


-- 
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.

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

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


[GitHub] [shardingsphere] RaigorJiang commented on a diff in pull request #22201: Update Oracle DML SLELECT DatetimeExpression statement parse

Posted by GitBox <gi...@apache.org>.
RaigorJiang commented on code in PR #22201:
URL: https://github.com/apache/shardingsphere/pull/22201#discussion_r1023642102


##########
sql-parser/statement/src/main/java/org/apache/shardingsphere/sql/parser/sql/common/segment/dml/expr/DatetimeExpression.java:
##########
@@ -0,0 +1,59 @@
+/*
+ * 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.sql.parser.sql.common.segment.dml.expr;
+
+import lombok.Getter;
+import lombok.Setter;
+import lombok.ToString;
+
+/**
+ * Binary operation expression.
+ */
+
+@Getter
+@Setter
+@ToString
+public final class DatetimeExpression implements ExpressionSegment {
+    
+    private final int startIndex;
+    
+    private final int stopIndex;
+    
+    private final ExpressionSegment left;
+    
+    private final ExpressionSegment right;
+    
+    private final String text;
+    
+    public DatetimeExpression(final int startIndex, final int stopIndex, final ExpressionSegment left, final ExpressionSegment right, final String text) {
+        this.startIndex = startIndex;
+        this.stopIndex = stopIndex;
+        this.left = left;
+        this.right = right;
+        this.text = text;
+    }
+    
+    public DatetimeExpression(final int startIndex, final int stopIndex, final ExpressionSegment left, final String text) {
+        this.startIndex = startIndex;
+        this.stopIndex = stopIndex;
+        this.left = left;
+        this.right = null;
+        this.text = text;
+    }
+    

Review Comment:
   unnecessary blank line



-- 
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.

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

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


[GitHub] [shardingsphere] RaigorJiang commented on a diff in pull request #22201: Update Oracle DML SLELECT DatetimeExpression statement parse

Posted by GitBox <gi...@apache.org>.
RaigorJiang commented on code in PR #22201:
URL: https://github.com/apache/shardingsphere/pull/22201#discussion_r1023641750


##########
sql-parser/statement/src/main/java/org/apache/shardingsphere/sql/parser/sql/common/segment/dml/expr/DatetimeExpression.java:
##########
@@ -0,0 +1,59 @@
+/*
+ * 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.sql.parser.sql.common.segment.dml.expr;
+
+import lombok.Getter;
+import lombok.Setter;
+import lombok.ToString;
+
+/**
+ * Binary operation expression.

Review Comment:
   Comment does not match the class name.



-- 
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.

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

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