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/23 09:53:25 UTC

[GitHub] [shardingsphere] Qianyi951015 opened a new pull request, #22363: Update Oracle SQL XMLTABLE function parse

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

   Fixes #22362.
   
   Ref: https://docs.oracle.com/en/database/oracle/oracle-database/12.2/sqlrf/XMLTABLE.html#GUID-C4A32C58-33E5-4CF1-A1FE-039550D3ECFA
   
   <img width="838" alt="image" src="https://user-images.githubusercontent.com/57847965/203517069-bb5c4a02-b330-4a6c-9c8e-56b003cb4240.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] RaigorJiang commented on a diff in pull request #22363: Update Oracle SQL XMLTABLE function parse

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


##########
sql-parser/statement/src/main/java/org/apache/shardingsphere/sql/parser/sql/common/segment/dml/expr/XmlNameSpacesClauseSegment.java:
##########
@@ -0,0 +1,45 @@
+/*
+ * 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.RequiredArgsConstructor;
+import lombok.ToString;
+import org.apache.shardingsphere.sql.parser.sql.common.segment.dml.expr.complex.ComplexExpressionSegment;
+
+import java.util.Collection;
+import java.util.LinkedList;
+
+/**
+ * Xml name spaces segment.
+ */
+@RequiredArgsConstructor
+@Getter
+@ToString
+public final class XmlNameSpacesClauseSegment implements ComplexExpressionSegment {
+    
+    private final int startIndex;
+    
+    private final int stopIndex;
+    
+    private final Collection<String> nameSpacesString = new LinkedList<>();

Review Comment:
   Can nameSpacesString be a String, not Collection?



-- 
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 #22363: Update Oracle SQL XMLTABLE function parse

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


-- 
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] Qianyi951015 commented on a diff in pull request #22363: Update Oracle SQL XMLTABLE function parse

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


##########
sql-parser/statement/src/main/java/org/apache/shardingsphere/sql/parser/sql/common/segment/generic/table/XmlTableSegment.java:
##########
@@ -0,0 +1,55 @@
+/*
+ * 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.generic.table;
+
+import lombok.Getter;
+import lombok.RequiredArgsConstructor;
+import lombok.Setter;
+import lombok.ToString;
+import org.apache.shardingsphere.sql.parser.sql.common.segment.dml.expr.XmlTableFunctionSegment;
+import org.apache.shardingsphere.sql.parser.sql.common.segment.generic.AliasSegment;
+
+import java.util.Optional;
+
+@RequiredArgsConstructor
+@Getter
+@Setter
+@ToString
+public final class XmlTableSegment implements TableSegment {

Review Comment:
   The required Javadoc has been added



-- 
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 #22363: Update Oracle SQL XMLTABLE function parse

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


##########
sql-parser/statement/src/main/java/org/apache/shardingsphere/sql/parser/sql/common/segment/generic/table/XmlTableSegment.java:
##########
@@ -0,0 +1,55 @@
+/*
+ * 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.generic.table;
+
+import lombok.Getter;
+import lombok.RequiredArgsConstructor;
+import lombok.Setter;
+import lombok.ToString;
+import org.apache.shardingsphere.sql.parser.sql.common.segment.dml.expr.XmlTableFunctionSegment;
+import org.apache.shardingsphere.sql.parser.sql.common.segment.generic.AliasSegment;
+
+import java.util.Optional;
+
+@RequiredArgsConstructor
+@Getter
+@Setter
+@ToString
+public final class XmlTableSegment implements TableSegment {

Review Comment:
   Missing java doc.



-- 
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 #22363: Update Oracle SQL XMLTABLE function parse

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

   # [Codecov](https://codecov.io/gh/apache/shardingsphere/pull/22363?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 [#22363](https://codecov.io/gh/apache/shardingsphere/pull/22363?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (1a4e07a) into [master](https://codecov.io/gh/apache/shardingsphere/commit/74ec5dfa35c98d7436a353456a6d5be99320a570?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (74ec5df) will **decrease** coverage by `0.04%`.
   > The diff coverage is `4.44%`.
   
   ```diff
   @@             Coverage Diff              @@
   ##             master   #22363      +/-   ##
   ============================================
   - Coverage     51.03%   50.98%   -0.05%     
   + Complexity     2507     2500       -7     
   ============================================
     Files          4166     4169       +3     
     Lines         57846    57858      +12     
     Branches       9818     9833      +15     
   ============================================
   - Hits          29520    29499      -21     
   - Misses        25793    25830      +37     
   + Partials       2533     2529       -4     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/shardingsphere/pull/22363?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [...r/statement/impl/OracleDMLStatementSQLVisitor.java](https://codecov.io/gh/apache/shardingsphere/pull/22363/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=) | `0.00% <0.00%> (ø)` | |
   | [...itor/statement/impl/OracleStatementSQLVisitor.java](https://codecov.io/gh/apache/shardingsphere/pull/22363/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=) | `0.00% <0.00%> (ø)` | |
   | [.../common/segment/generic/table/XmlTableSegment.java](https://codecov.io/gh/apache/shardingsphere/pull/22363/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-c3FsLXBhcnNlci9zdGF0ZW1lbnQvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NoYXJkaW5nc3BoZXJlL3NxbC9wYXJzZXIvc3FsL2NvbW1vbi9zZWdtZW50L2dlbmVyaWMvdGFibGUvWG1sVGFibGVTZWdtZW50LmphdmE=) | `0.00% <0.00%> (ø)` | |
   | [...er/internal/asserts/segment/table/TableAssert.java](https://codecov.io/gh/apache/shardingsphere/pull/22363/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-dGVzdC9wYXJzZXIvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NoYXJkaW5nc3BoZXJlL3Rlc3Qvc3FsL3BhcnNlci9pbnRlcm5hbC9hc3NlcnRzL3NlZ21lbnQvdGFibGUvVGFibGVBc3NlcnQuamF2YQ==) | `0.00% <0.00%> (ø)` | |
   | [...arser/domain/segment/impl/table/ExpectedTable.java](https://codecov.io/gh/apache/shardingsphere/pull/22363/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-dGVzdC9wYXJzZXIvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NoYXJkaW5nc3BoZXJlL3Rlc3Qvc3FsL3BhcnNlci9pbnRlcm5hbC9jYXNlcy9wYXJzZXIvZG9tYWluL3NlZ21lbnQvaW1wbC90YWJsZS9FeHBlY3RlZFRhYmxlLmphdmE=) | `100.00% <ø> (ø)` | |
   | [...in/segment/impl/expr/ExpectedXmlTableFunction.java](https://codecov.io/gh/apache/shardingsphere/pull/22363/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-dGVzdC9wYXJzZXIvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NoYXJkaW5nc3BoZXJlL3Rlc3Qvc3FsL3BhcnNlci9pbnRlcm5hbC9jYXNlcy9wYXJzZXIvZG9tYWluL3NlZ21lbnQvaW1wbC9leHByL0V4cGVjdGVkWG1sVGFibGVGdW5jdGlvbi5qYXZh) | `100.00% <100.00%> (ø)` | |
   | [...er/domain/segment/impl/table/ExpectedXmlTable.java](https://codecov.io/gh/apache/shardingsphere/pull/22363/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-dGVzdC9wYXJzZXIvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NoYXJkaW5nc3BoZXJlL3Rlc3Qvc3FsL3BhcnNlci9pbnRlcm5hbC9jYXNlcy9wYXJzZXIvZG9tYWluL3NlZ21lbnQvaW1wbC90YWJsZS9FeHBlY3RlZFhtbFRhYmxlLmphdmE=) | `100.00% <100.00%> (ø)` | |
   | [...migration/update/StopMigrationStatementAssert.java](https://codecov.io/gh/apache/shardingsphere/pull/22363/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-dGVzdC9wYXJzZXIvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NoYXJkaW5nc3BoZXJlL3Rlc3Qvc3FsL3BhcnNlci9pbnRlcm5hbC9hc3NlcnRzL3N0YXRlbWVudC9yYWwvaW1wbC9taWdyYXRpb24vdXBkYXRlL1N0b3BNaWdyYXRpb25TdGF0ZW1lbnRBc3NlcnQuamF2YQ==) | `50.00% <0.00%> (-4.55%)` | :arrow_down: |
   | [...igration/update/StartMigrationStatementAssert.java](https://codecov.io/gh/apache/shardingsphere/pull/22363/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-dGVzdC9wYXJzZXIvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NoYXJkaW5nc3BoZXJlL3Rlc3Qvc3FsL3BhcnNlci9pbnRlcm5hbC9hc3NlcnRzL3N0YXRlbWVudC9yYWwvaW1wbC9taWdyYXRpb24vdXBkYXRlL1N0YXJ0TWlncmF0aW9uU3RhdGVtZW50QXNzZXJ0LmphdmE=) | `50.00% <0.00%> (-4.55%)` | :arrow_down: |
   | [...gration/update/CommitMigrationStatementAssert.java](https://codecov.io/gh/apache/shardingsphere/pull/22363/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-dGVzdC9wYXJzZXIvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NoYXJkaW5nc3BoZXJlL3Rlc3Qvc3FsL3BhcnNlci9pbnRlcm5hbC9hc3NlcnRzL3N0YXRlbWVudC9yYWwvaW1wbC9taWdyYXRpb24vdXBkYXRlL0NvbW1pdE1pZ3JhdGlvblN0YXRlbWVudEFzc2VydC5qYXZh) | `50.00% <0.00%> (-4.55%)` | :arrow_down: |
   | ... and [54 more](https://codecov.io/gh/apache/shardingsphere/pull/22363/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