andygrove opened a new pull request, #4052: URL: https://github.com/apache/datafusion-comet/pull/4052
## Which issue does this PR close? Part of #4050. ## Rationale for this change Issue #4050 asks for a single source of truth for Spark expression compatibility that can drive doc generation and cross-version audits. This PR lays the data-model foundation: a structured `SupportCondition` type whose instances are enumerable at build time. Free-form `getSupportLevel` overrides are the drift-prone status quo. ## What changes are included in this PR? - New `SupportCondition[-T <: Expression]` trait + `SupportLevelKind` sum type in `SupportLevel.scala`, with builder helpers (`apply`, `unsupported`, `incompatible`, `compatibleWithNote`). - `CometExpressionSerde[T]` gains `conditions: Seq[SupportCondition[T]]`. Default `getSupportLevel` is derived from it (first-match-wins, falls back to `Compatible(None)`). - Existing serdes that override `getSupportLevel` continue to work unchanged. - Proof-of-concept migration of `CometLength` (single condition) and `CometSortArray` (two ordered conditions, one config-dependent). Deferred to follow-up PRs: backfilling remaining serdes, aggregation across serde registry, doc generation, CI consistency checks, Spark-version metadata on conditions. ## How are these changes tested? New `SupportConditionSuite` with 12 unit tests covering: empty conditions, no match, first-match ordering, each `SupportLevelKind`, expression-dependent messages, and per-serde assertions for `CometLength` and `CometSortArray` (id / level / description). Existing `CometStringExpressionSuite` and `CometArrayExpressionSuite` pass unchanged, confirming observable behavior is preserved. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
