You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
That assumption spans separate support checks. CometScanRule validates the partition schema through CometScanTypeChecker, while partition2Proto later relies on CometLiteral / exprToProto supporting each concrete value. If those capabilities drift, Comet has already selected the native scan and raises AssertionError instead of falling back to Spark.
PR #5161 exposed this with YearMonthIntervalType: the scan checker admitted the partition type before the literal path supported it. That specific interval gap is fixed by the PR, but the generic assertion remains. There is no currently known unsupported partition literal that passes the gate at the PR head; this issue tracks hardening the invariant before another type exposes it.
The helper is shared by the native Parquet and CSV scan paths.
Describe the potential solution
Use one shared capability check for partition-schema admission and partition-literal serialization so the two cannot drift.
Validate partition-value serialization before committing to the native scan, or otherwise propagate serialization failure to a point where Spark fallback is still possible.
Record a useful fallback reason instead of surfacing AssertionError as an internal failure.
Add a regression test that deliberately exercises an unsupported partition literal and verifies clean fallback.
What is the problem the feature request solves?
partition2Protoassumes that accepting a partition schema guarantees every concrete partition value can be serialized:That assumption spans separate support checks.
CometScanRulevalidates the partition schema throughCometScanTypeChecker, whilepartition2Protolater relies onCometLiteral/exprToProtosupporting each concrete value. If those capabilities drift, Comet has already selected the native scan and raisesAssertionErrorinstead of falling back to Spark.PR #5161 exposed this with
YearMonthIntervalType: the scan checker admitted the partition type before the literal path supported it. That specific interval gap is fixed by the PR, but the generic assertion remains. There is no currently known unsupported partition literal that passes the gate at the PR head; this issue tracks hardening the invariant before another type exposes it.The helper is shared by the native Parquet and CSV scan paths.
Describe the potential solution
AssertionErroras an internal failure.Additional context
partition2Proto:datafusion-comet/spark/src/main/scala/org/apache/comet/serde/operator/package.scala
Lines 48 to 65 in 2963b08
datafusion-comet/spark/src/main/scala/org/apache/spark/sql/comet/CometNativeScanExec.scala
Lines 215 to 228 in 2963b08
datafusion-comet/spark/src/main/scala/org/apache/spark/sql/comet/CometCsvNativeScanExec.scala
Lines 95 to 105 in 2963b08