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


##########
spark/src/main/scala/org/apache/comet/DataTypeSupport.scala:
##########
@@ -39,7 +39,10 @@ trait DataTypeSupport {
         BinaryType | StringType | _: DecimalType | DateType | TimestampType =>
       true
     case t: DataType if t.typeName == "timestamp_ntz" => true
-    case _: StructType => true
+    case _: StructType

Review Comment:
   With only the original scan enabled, this caused CometScan to be used for 
Struct types (which it did not support).



##########
common/src/main/java/org/apache/comet/parquet/NativeBatchReader.java:
##########
@@ -267,9 +267,9 @@ public void init() throws URISyntaxException, IOException {
     //    ShimFileFormat.findRowIndexColumnIndexInSchema(sparkSchema);
     for (int i = 0; i < requestedSchema.getFieldCount(); i++) {
       Type t = requestedSchema.getFields().get(i);
-      Preconditions.checkState(
-          t.isPrimitive() && !t.isRepetition(Type.Repetition.REPEATED),
-          "Complex type is not supported");
+      //      Preconditions.checkState(

Review Comment:
   This is for the second implementation. Will remove this later



##########
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:
   @Liang-chi - 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