Comet accelerates window functions with RANGE frames, but falls back to Spark when the frame uses an explicit PRECEDING/FOLLOWING offset and the ORDER BY column is DATE or DECIMAL.
See the fallbacks in spark/src/main/scala/org/apache/spark/sql/comet/CometWindowExec.scala (the RANGE-frame checks around lines 377-391):
- DATE ORDER BY: falls back with "RANGE frame with explicit offset on DATE ORDER BY is not supported" because Date32 + Int32 frame arithmetic is not handled in the native comparator.
- DECIMAL ORDER BY: falls back with "RANGE frame with explicit offset on DECIMAL ORDER BY is not supported" because decimal precision widening breaks the frame comparator.
Pure UNBOUNDED/CURRENT ROW RANGE frames on these order-by types already run natively; only explicit numeric offsets fall back.
Documented as a current limitation in the window function compatibility guide.
Comet accelerates window functions with
RANGEframes, but falls back to Spark when the frame uses an explicitPRECEDING/FOLLOWINGoffset and theORDER BYcolumn isDATEorDECIMAL.See the fallbacks in
spark/src/main/scala/org/apache/spark/sql/comet/CometWindowExec.scala(the RANGE-frame checks around lines 377-391):Pure
UNBOUNDED/CURRENT ROWRANGE frames on these order-by types already run natively; only explicit numeric offsets fall back.Documented as a current limitation in the window function compatibility guide.