Shekharrajak opened a new pull request, #3206:
URL: https://github.com/apache/datafusion-comet/pull/3206
Closes #3181
## Rationale for this change
Enable native execution for Spark's `LEFT(str, len)` function to improve
query performance by avoiding JVM fallback.
## What changes are included in this PR?
- Added `CometLeft` serializer that transforms `LEFT(str, len)` to
`Substring(str, 1, len)` protobuf
- Registered `Left` expression in `QueryPlanSerde` string expressions map
- No protobuf or Rust changes required (reuses existing Substring
implementation)
## How are these changes tested?
Added 4 test suites in `CometExpressionSuite`:
- Basic functionality (various lengths: 0, -1, positive, exceeds length)
- Unicode character handling (emoji, multi-byte chars)
- Equivalence verification with `SUBSTRING(str, 1, len)`
- Dictionary encoding preservation
--
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]