feiniaofeiafei opened a new pull request, #71056: URL: https://github.com/apache/doris/pull/71056
Backport of #56190 to `branch-3.0`. FE constant folding inferred the result type of decimal ABS from the absolute value. A folded value could therefore have lower precision than the declared result slot. This could cause a type mismatch when BE materialized constant UNION rows. Preserve the input DecimalV2 or DecimalV3 type when constructing the folded literal. Include the upstream unit tests and extend the SQL regression suite to check the folded output precision and the ordered results of a two-row constant UNION ALL. Validation: `git diff --check` passed. The unpatched 3.0.8 FE reported DECIMAL(4,4) for the new precision assertion's DECIMAL(5,4) input. The backport has not been built or run locally. -- 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]
