morrySnow opened a new pull request, #68134:
URL: https://github.com/apache/doris/pull/68134
### What problem does this PR solve?
Issue Number: None
Related PR: None
Problem Summary: Nereids classified ambiguous complex-to-string casts as
injective, allowing them to move across DISTINCT set operations and potentially
change distinct results. FE datetime cast nullability also did not match the BE
output-column behavior, while several proven one-to-one casts were omitted.
Align the classifications with BE kernels, retain conservative treatment for
lossy or context-dependent conversions, document the proof obligations, and add
boundary and rewrite tests.
### Release note
Fix incorrect DISTINCT and GROUP BY rewrite decisions for casts and align FE
datetime cast nullability with BE.
### Check List (For Author)
- Test: Unit Test
- `./run-fe-ut.sh --run
org.apache.doris.nereids.types.DataTypeTest,org.apache.doris.nereids.rules.rewrite.SimplifyAggGroupByTest,org.apache.doris.nereids.trees.expressions.CastTest,org.apache.doris.nereids.rules.rewrite.PushProjectThroughUnionTest`
- `mvn checkstyle:check -pl fe-core`
- Behavior changed: Yes. Only proven injective casts may participate in
distinctness-preserving rewrites, and FE datetime cast nullability now matches
BE.
- Does this need documentation: No
--
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]