-
Notifications
You must be signed in to change notification settings - Fork 166
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: [comet-parquet-exec] fix regressions original comet native scal implementation #1170
Changes from all commits
7633972
bfaecb0
a7fad04
1f3a3ee
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. With only the original scan enabled, this caused CometScan to be used for Struct types (which it did not support). |
||
if CometConf.COMET_FULL_NATIVE_SCAN_ENABLED | ||
.get() || CometConf.COMET_NATIVE_ARROW_SCAN_ENABLED.get() => | ||
true | ||
case _ => false | ||
} | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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]) = { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @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 (bucketedScan) { | ||
(wrapped.outputPartitioning, wrapped.outputOrdering) | ||
} else { | ||
val files = selectedPartitions.flatMap(partition => partition.files) | ||
val numPartitions = files.length | ||
(UnknownPartitioning(numPartitions), wrapped.outputOrdering) | ||
} | ||
} | ||
|
||
@transient | ||
private lazy val pushedDownFilters = getPushedDownFilters(relation, dataFilters) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is for the second implementation. Will remove this later