Skip to content

Include days in CalendarInterval hash when Spark 4.3+ is supported (SPARK-58236) #5498

Description

@peterxcli

Spark <= 4.2 codegen omits the days field when hashing CalendarIntervalType (hash / xxhash64), and Comet's native hasher matches that (#5135). SPARK-58236 (apache/spark commit a2616be0f) fixes Spark's codegen to include days starting in Spark 4.3, aligning it with the interpreted path.

When Comet adds a Spark 4.3 profile, the hash becomes version-dependent:

  • resolve an include_days boolean in ShimCometConf per the shim convention
  • carry it through the protobuf hash expression
  • branch on it in hash_array_interval_month_day_nano! in native/spark-expr/src/hash_funcs/utils.rs

Until then, all supported versions (v3.4.3, v3.5.8, v4.0.1, v4.1.2, v4.2.0) omit days and the fix has not been backported to any release branch, so no native change is needed yet.

Follow-up from review discussion on #5135.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions