parthchandra commented on code in PR #1170:
URL: https://github.com/apache/datafusion-comet/pull/1170#discussion_r1884226642


##########
spark/src/main/scala/org/apache/spark/sql/comet/CometScanExec.scala:
##########
@@ -131,8 +131,15 @@ case class CometScanExec(
   // exposed for testing
   lazy val bucketedScan: Boolean = wrapped.bucketedScan
 
-  override lazy val (outputPartitioning, outputOrdering): (Partitioning, 
Seq[SortOrder]) =
-    (wrapped.outputPartitioning, wrapped.outputOrdering)
+  override lazy val (outputPartitioning, outputOrdering): (Partitioning, 
Seq[SortOrder]) = {

Review Comment:
   @viirya  - The previous fix to address outputPartitioning (using inputRDD) 
was not correct and caused multiple test failures. This is a different attempt 
(and at least all the tests pass).
   If this is a bucketedScan, we fall back to the wrapped FileSourceScanLike 
implementation but for non bucketed case since FileSourceScanLike always 
returned 0 partitions, we override the behaviour, setting the num of partitions 
to the number of files. 
   I'm not entirely sure this covers all cases so please advise.



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