-
Notifications
You must be signed in to change notification settings - Fork 582
Description
Phase 1:
- Timestamp data conversions, including r2c, c2r etc.
- Timestamp split
- Timestamp Scan (TODO: support timestamp int96 type)
Support timestamp reader oap-project/velox#205
Phase 2:
- Datetime functions in
spark/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/datetimeExpressions.scala
Note: For Foldable or Unevaluable expressions with no input, Spark's optimizer can precompute their values, allowing Gluten to treat them as constant columns.
-
ConvertTimezone -- TimestampNTZ not supported
-
CurrentTimeZone -- Unevaluable, compute by Spark
-
CurrentTimestamp -- Foldable, compute by Spark
-
Extract -- A set of various datetime expressions. Not all expressions and type are supported.
-
FromUTCTimestamp
-
FromUnixTime
-
Hour
-
LocalTimestamp -- Foldable, compute by Spark
-
MakeInterval -- CalendarIntervalType not supported
-
MakeTimestamp
-
MakeTimestampLTZExpressionBuilder
-
MakeTimestampNTZExpressionBuilder -- TimestampNTZType not supported
-
MicrosToTimestamp
-
MillisToTimestamp
-
Minute
-
Now -- Foldable, compute by Spark
-
ParseToTimestamp -- Result mismatch
-
ParseToTimestampLTZExpressionBuilder -- Same as ParseToTimestamp
-
ParseToTimestampNTZExpressionBuilder -- TimestampNTZType not supported
-
Second
-
SecondsToTimestamp -- feat: Add Spark timestamp_seconds function facebookincubator/velox#14222
-
ToUTCTimestamp
-
ToUnixTimestamp
-
TruncTimestamp -- feat: Add Spark date_trunc function facebookincubator/velox#11340 & [GLUTEN-7589][VL] Support date_trunc function #7611
-
TryToTimestampExpressionBuilder -- Same as ParseToTimestamp
-
UnixMicros
-
UnixMillis
-
UnixSecond
-
UnixTimestamp
-
Cast support
- Cast to Timestamp
-
- Cast from date/integer/floating-point types to timestamp are supported.
- Cast from timestamp
-
- Cast timestamp to date is supported.
-
- Cast timestamp to string is supported with some inconsistency with Spark (see Support all patterns for Spark CAST(varchar as timestamp) facebookincubator/velox#11114 & fix(sparksql): Fix result mismatch cases in casting varchar to timestamp facebookincubator/velox#12630).
-
- Cast timestamp to int is supported (feat: Add Spark CAST(timestamp as integral) facebookincubator/velox#11468).
- Cast from/to TimestampNTZ
Phase 3:
- Enable operators including Filter/Project/Sort/Agg/Hash-partition Shuffle.