andygrove opened a new pull request, #3463: URL: https://github.com/apache/datafusion-comet/pull/3463
## Which issue does this PR close? Follow-up to #3207. Migrates left/right expression tests to the SQL file test framework and adds additional coverage. ## Rationale for this change The SQL file test framework is the recommended approach for expression testing — no Scala code to write, no recompilation needed when tests change, and automatic constant folding disablement. ## What changes are included in this PR? **left.sql** — Enhanced with additional test cases: - Column + literal edge cases: `left(s, 0)`, `left(s, -1)`, `left(s, 10)` (len exceeds string length) - Unicode test table with multi-byte characters (CJK, emoji, Devanagari) **right.sql** — New file with comprehensive coverage: - Column + literal for all edge cases (len=0, -1, positive, exceeds length) - Null propagation: `right(NULL, 0)` must return NULL not empty string - Mixed null/non-null values with non-positive length - Equivalence verification with `substring(s, -3, 3)` - Unicode characters (CJK, emoji, Devanagari) - Both-columns and literal+column fallback cases Note: `right` uses `spark_answer_only` because `Right` is a `RuntimeReplaceable` expression — Spark's optimizer replaces it with `If(IsNull, null, If(len<=0, "", Substring))` before Comet's serde layer sees it. ## How are these changes tested? All tests run via `CometSqlFileTestSuite` with `ConfigMatrix: parquet.enable.dictionary=false,true`. 🤖 Generated with [Claude Code](https://claude.com/claude-code) -- 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]
