dbatomic commented on code in PR #44537:
URL: https://github.com/apache/spark/pull/44537#discussion_r1441563199


##########
sql/core/src/main/scala/org/apache/spark/sql/execution/dynamicpruning/PartitionPruning.scala:
##########
@@ -207,14 +208,20 @@ object PartitionPruning extends Rule[LogicalPlan] with 
PredicateHelper with Join
     }
   }
 
+  private def hasNoCollations(plan: LogicalPlan): Boolean = {
+    // TODO: Should be more selective here.
+    // Don't fully understand this code path.
+    !plan.expressions.exists(e => e.dataType.isInstanceOf[CollatedStringType])
+  }
+
   /**
    * To be able to prune partitions on a join key, the filtering side needs to
    * meet the following requirements:
    *   (1) it can not be a stream
    *   (2) it needs to contain a selective predicate used for filtering
    */
   private def hasPartitionPruningFilter(plan: LogicalPlan): Boolean = {
-    !plan.isStreaming && hasSelectivePredicate(plan)
+    !plan.isStreaming && hasSelectivePredicate(plan) && hasNoCollations(plan)

Review Comment:
   Yep, idea is to disable pruning altogether. At this point pruning part is 
still not stable and I also don't have any test coverage for pruning. You are 
right, need to take care of other "prunings" as well.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to