You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ignite.apache.org by GitBox <gi...@apache.org> on 2021/08/02 12:21:28 UTC

[GitHub] [ignite] ivandasch opened a new pull request #9291: IGNITE-14749 Fix table not found on multiline queries with ddl.

ivandasch opened a new pull request #9291:
URL: https://github.com/apache/ignite/pull/9291


   Thank you for submitting the pull request to the Apache Ignite.
   
   In order to streamline the review of the contribution 
   we ask you to ensure the following steps have been taken:
   
   ### The Contribution Checklist
   - [ ] There is a single JIRA ticket related to the pull request. 
   - [ ] The web-link to the pull request is attached to the JIRA ticket.
   - [ ] The JIRA ticket has the _Patch Available_ state.
   - [ ] The pull request body describes changes that have been made. 
   The description explains _WHAT_ and _WHY_ was made instead of _HOW_.
   - [ ] The pull request title is treated as the final commit message. 
   The following pattern must be used: `IGNITE-XXXX Change summary` where `XXXX` - number of JIRA issue.
   - [ ] A reviewer has been mentioned through the JIRA comments 
   (see [the Maintainers list](https://cwiki.apache.org/confluence/display/IGNITE/How+to+Contribute#HowtoContribute-ReviewProcessandMaintainers)) 
   - [ ] The pull request has been checked by the Teamcity Bot and 
   the `green visa` attached to the JIRA ticket (see [TC.Bot: Check PR](https://mtcga.gridgain.com/prs.html))
   
   ### Notes
   - [How to Contribute](https://cwiki.apache.org/confluence/display/IGNITE/How+to+Contribute)
   - [Coding abbreviation rules](https://cwiki.apache.org/confluence/display/IGNITE/Abbreviation+Rules)
   - [Coding Guidelines](https://cwiki.apache.org/confluence/display/IGNITE/Coding+Guidelines)
   - [Apache Ignite Teamcity Bot](https://cwiki.apache.org/confluence/display/IGNITE/Apache+Ignite+Teamcity+Bot)
   
   If you need any help, please email dev@ignite.apache.org or ask anу advice on http://asf.slack.com _#ignite_ channel.
   


-- 
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@ignite.apache.org

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



[GitHub] [ignite] ivandasch commented on a change in pull request #9291: IGNITE-14749 Fix table not found on multiline queries with ddl.

Posted by GitBox <gi...@apache.org>.
ivandasch commented on a change in pull request #9291:
URL: https://github.com/apache/ignite/pull/9291#discussion_r685166677



##########
File path: modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/exec/ExecutionServiceImpl.java
##########
@@ -490,6 +498,10 @@ private PlanningContext createContext(Context parent, AffinityTopologyVersion to
             .build();
     }
 
+    private SchemaPlus getDefaultSchema(String schema) {

Review comment:
       Fixed




-- 
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@ignite.apache.org

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



[GitHub] [ignite] alex-plekhanov commented on a change in pull request #9291: IGNITE-14749 Fix table not found on multiline queries with ddl.

Posted by GitBox <gi...@apache.org>.
alex-plekhanov commented on a change in pull request #9291:
URL: https://github.com/apache/ignite/pull/9291#discussion_r685150449



##########
File path: modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/exec/ExecutionServiceImpl.java
##########
@@ -490,6 +498,10 @@ private PlanningContext createContext(Context parent, AffinityTopologyVersion to
             .build();
     }
 
+    private SchemaPlus getDefaultSchema(String schema) {

Review comment:
       JavaDoc




-- 
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@ignite.apache.org

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



[GitHub] [ignite] ivandasch closed pull request #9291: IGNITE-14749 Fix table not found on multiline queries with ddl.

Posted by GitBox <gi...@apache.org>.
ivandasch closed pull request #9291:
URL: https://github.com/apache/ignite/pull/9291


   


-- 
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@ignite.apache.org

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



[GitHub] [ignite] ivandasch commented on a change in pull request #9291: IGNITE-14749 Fix table not found on multiline queries with ddl.

Posted by GitBox <gi...@apache.org>.
ivandasch commented on a change in pull request #9291:
URL: https://github.com/apache/ignite/pull/9291#discussion_r684140622



##########
File path: modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/exec/ExecutionServiceImpl.java
##########
@@ -647,10 +607,15 @@ private FieldsMetadata explainFieldsMetadata(PlanningContext ctx) {
     }
 
     /** */
-    private FieldsQueryCursor<List<?>> executePlan(UUID qryId, PlanningContext pctx, QueryPlan plan) {
+    private FieldsQueryCursor<List<?>> executePlan(
+        UUID qryId,
+        PlanningContext pctx,
+        QueryPlan plan
+    ) {
         switch (plan.type()) {
             case DML:
-                // TODO a barrier between previous operation and this one
+                ListFieldsQueryCursor<?> cur = executeQuery(qryId, (MultiStepPlan)plan, pctx);
+                return new ListFieldsQueryCursor<>(cur.getAll(), cur.fieldsMeta(), cur.isQuery());

Review comment:
       Fixed




-- 
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@ignite.apache.org

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



[GitHub] [ignite] zstan commented on a change in pull request #9291: IGNITE-14749 Fix table not found on multiline queries with ddl.

Posted by GitBox <gi...@apache.org>.
zstan commented on a change in pull request #9291:
URL: https://github.com/apache/ignite/pull/9291#discussion_r683168703



##########
File path: modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/exec/ExecutionServiceImpl.java
##########
@@ -472,6 +464,18 @@ protected AffinityTopologyVersion topologyVersion() {
         return exchangeManager().readyAffinityVersion();
     }
 
+    /** */
+    private static SqlNodeList parse(String qry) {

Review comment:
       lets get rid of org.apache.ignite.internal.processors.query.calcite.prepare.IgnitePlanner#parse ? Additionally i suggest to move this static method into more suitable class ?




-- 
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@ignite.apache.org

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



[GitHub] [ignite] ivandasch commented on a change in pull request #9291: IGNITE-14749 Fix table not found on multiline queries with ddl.

Posted by GitBox <gi...@apache.org>.
ivandasch commented on a change in pull request #9291:
URL: https://github.com/apache/ignite/pull/9291#discussion_r683241121



##########
File path: modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/exec/ExecutionServiceImpl.java
##########
@@ -472,6 +464,18 @@ protected AffinityTopologyVersion topologyVersion() {
         return exchangeManager().readyAffinityVersion();
     }
 
+    /** */
+    private static SqlNodeList parse(String qry) {

Review comment:
       Good idea, but we cannot get rid of it, because this methods are defined in the Planner interface from Calcite




-- 
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@ignite.apache.org

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



[GitHub] [ignite] alex-plekhanov commented on a change in pull request #9291: IGNITE-14749 Fix table not found on multiline queries with ddl.

Posted by GitBox <gi...@apache.org>.
alex-plekhanov commented on a change in pull request #9291:
URL: https://github.com/apache/ignite/pull/9291#discussion_r684059035



##########
File path: modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/exec/ExecutionServiceImpl.java
##########
@@ -647,10 +607,15 @@ private FieldsMetadata explainFieldsMetadata(PlanningContext ctx) {
     }
 
     /** */
-    private FieldsQueryCursor<List<?>> executePlan(UUID qryId, PlanningContext pctx, QueryPlan plan) {
+    private FieldsQueryCursor<List<?>> executePlan(
+        UUID qryId,
+        PlanningContext pctx,
+        QueryPlan plan
+    ) {
         switch (plan.type()) {
             case DML:
-                // TODO a barrier between previous operation and this one
+                ListFieldsQueryCursor<?> cur = executeQuery(qryId, (MultiStepPlan)plan, pctx);
+                return new ListFieldsQueryCursor<>(cur.getAll(), cur.fieldsMeta(), cur.isQuery());

Review comment:
       It's enough to just call `cur.iterator().hasNext()` without copying to gain the same result.




-- 
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@ignite.apache.org

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



[GitHub] [ignite] ivandasch commented on a change in pull request #9291: IGNITE-14749 Fix table not found on multiline queries with ddl.

Posted by GitBox <gi...@apache.org>.
ivandasch commented on a change in pull request #9291:
URL: https://github.com/apache/ignite/pull/9291#discussion_r683241121



##########
File path: modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/exec/ExecutionServiceImpl.java
##########
@@ -472,6 +464,18 @@ protected AffinityTopologyVersion topologyVersion() {
         return exchangeManager().readyAffinityVersion();
     }
 
+    /** */
+    private static SqlNodeList parse(String qry) {

Review comment:
       Good idea, but we cannot get rid of it, because this methods are defined in the Planner interface from Calcite




-- 
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@ignite.apache.org

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



[GitHub] [ignite] zstan commented on a change in pull request #9291: IGNITE-14749 Fix table not found on multiline queries with ddl.

Posted by GitBox <gi...@apache.org>.
zstan commented on a change in pull request #9291:
URL: https://github.com/apache/ignite/pull/9291#discussion_r683168703



##########
File path: modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/exec/ExecutionServiceImpl.java
##########
@@ -472,6 +464,18 @@ protected AffinityTopologyVersion topologyVersion() {
         return exchangeManager().readyAffinityVersion();
     }
 
+    /** */
+    private static SqlNodeList parse(String qry) {

Review comment:
       lets get rid of org.apache.ignite.internal.processors.query.calcite.prepare.IgnitePlanner#parse ? Additionally i suggest to move this static method into more suitable class ?




-- 
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@ignite.apache.org

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