You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@drill.apache.org by GitBox <gi...@apache.org> on 2022/01/26 17:08:22 UTC

[GitHub] [drill] vvysotskyi opened a new pull request #2436: DRILL-8114: Prevent applying Iceberg project on non-Iceberg tables

vvysotskyi opened a new pull request #2436:
URL: https://github.com/apache/drill/pull/2436


   # [DRILL-8114](https://issues.apache.org/jira/browse/DRILL-8114): Prevent applying Iceberg project on non-Iceberg tables
   
   ## Description
   Added checks to ensure that table has iceberg group scan when matching iceberg rules (the same for mongo).
   
   ## Documentation
   NA
   
   ## Testing
   Added unit tests.
   


-- 
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: dev-unsubscribe@drill.apache.org

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



[GitHub] [drill] vvysotskyi commented on a change in pull request #2436: DRILL-8114: Prevent applying Iceberg project on non-Iceberg tables

Posted by GitBox <gi...@apache.org>.
vvysotskyi commented on a change in pull request #2436:
URL: https://github.com/apache/drill/pull/2436#discussion_r793288096



##########
File path: contrib/format-iceberg/src/main/java/org/apache/drill/exec/store/iceberg/plan/IcebergPluginImplementor.java
##########
@@ -144,14 +141,18 @@ public boolean splitProject(Project project) {
 
   @Override
   public boolean canImplement(Project project) {
-    return true;
+    return hasIcebergGroupScan(project);
   }
 
   @Override
   public GroupScan getPhysicalOperator() {
     return groupScan;
   }
 
+  private boolean hasIcebergGroupScan(RelNode node) {

Review comment:
       Yes, this PR also fixes the issue from that PR.




-- 
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: dev-unsubscribe@drill.apache.org

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



[GitHub] [drill] luocooong commented on a change in pull request #2436: DRILL-8114: Prevent applying Iceberg project on non-Iceberg tables

Posted by GitBox <gi...@apache.org>.
luocooong commented on a change in pull request #2436:
URL: https://github.com/apache/drill/pull/2436#discussion_r793295277



##########
File path: contrib/storage-mongo/src/main/java/org/apache/drill/exec/store/mongo/plan/MongoPluginImplementor.java
##########
@@ -292,7 +297,11 @@ public GroupScan getPhysicalOperator() {
       newSpec, columns, runAggregate);
   }
 
-  public static int direction(RelFieldCollation fieldCollation) {
+  private boolean hasMongoGroupScan(RelNode node) {

Review comment:
       @vvysotskyi I have an idea, could we transform that function as a base or interface function (such the `hasXXXGroupscan()`)? Ensure the new format based on this framework is needed to implement this filter function.




-- 
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: dev-unsubscribe@drill.apache.org

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



[GitHub] [drill] vvysotskyi commented on pull request #2436: DRILL-8114: Prevent applying Iceberg project on non-Iceberg tables

Posted by GitBox <gi...@apache.org>.
vvysotskyi commented on pull request #2436:
URL: https://github.com/apache/drill/pull/2436#issuecomment-1023305677


   @luocooong, thanks for the review!


-- 
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: dev-unsubscribe@drill.apache.org

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



[GitHub] [drill] luocooong merged pull request #2436: DRILL-8114: Prevent applying Iceberg project on non-Iceberg tables

Posted by GitBox <gi...@apache.org>.
luocooong merged pull request #2436:
URL: https://github.com/apache/drill/pull/2436


   


-- 
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: dev-unsubscribe@drill.apache.org

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



[GitHub] [drill] luocooong commented on a change in pull request #2436: DRILL-8114: Prevent applying Iceberg project on non-Iceberg tables

Posted by GitBox <gi...@apache.org>.
luocooong commented on a change in pull request #2436:
URL: https://github.com/apache/drill/pull/2436#discussion_r793142009



##########
File path: contrib/format-iceberg/src/main/java/org/apache/drill/exec/store/iceberg/plan/IcebergPluginImplementor.java
##########
@@ -144,14 +141,18 @@ public boolean splitProject(Project project) {
 
   @Override
   public boolean canImplement(Project project) {
-    return true;
+    return hasIcebergGroupScan(project);
   }
 
   @Override
   public GroupScan getPhysicalOperator() {
     return groupScan;
   }
 
+  private boolean hasIcebergGroupScan(RelNode node) {

Review comment:
       It seems that this validation rule also applies to #2389?




-- 
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: dev-unsubscribe@drill.apache.org

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



[GitHub] [drill] vvysotskyi commented on a change in pull request #2436: DRILL-8114: Prevent applying Iceberg project on non-Iceberg tables

Posted by GitBox <gi...@apache.org>.
vvysotskyi commented on a change in pull request #2436:
URL: https://github.com/apache/drill/pull/2436#discussion_r793305389



##########
File path: contrib/storage-mongo/src/main/java/org/apache/drill/exec/store/mongo/plan/MongoPluginImplementor.java
##########
@@ -292,7 +297,11 @@ public GroupScan getPhysicalOperator() {
       newSpec, columns, runAggregate);
   }
 
-  public static int direction(RelFieldCollation fieldCollation) {
+  private boolean hasMongoGroupScan(RelNode node) {

Review comment:
       Thanks, done.




-- 
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: dev-unsubscribe@drill.apache.org

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