Repository navigation
Conversation
|
Workflow [PR], commit [f615b35] Summary: ❌
AI ReviewSummaryThe PR makes numeric conversions to Consumers checked for the newly nullable conversion result:
Final VerdictStatus: ✅ Approve |
… in `CAST` to `Enum`
…rateOrNull` for internal casts to `Enum`
|
@lazerg check the CI failures |
|
The Fast test and arm_tidy failures were mine: a compiler error about an uninitialized variable in the enum cast. I fixed it in 117cc21. |
AI review of a later commit does not approve the PR, see the AI Review comment.
…n_from_numbers_to_enum is disabled
|
@lazerg merge with master one more time, the AST fuzzer failures may be unrelated |
|
Merged master in f615b35. The AST fuzzer query fails the same way on master 26.12.1.217, and so does |
|
#132543 has to be merged first |
Build profile diff (arm_release)Comparing ✅ No significant changes. Binary sizes
The official master build is compiled with Object file sizes3 object files changed (+53.19 KiB total), 0 added.
716 more object files are built by the master warmup baseline only (it builds every object-file target, a pull request build only Compile time of recompiled translation units40 translation units recompiled, 214 s compile time in total, 40 of them have a recent master baseline. |
Closes: #132250
Closes: #133242
Related: #119183
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
Fixed
accurateCastOrNullandaccurateCastOrDefaultof a number to anEnum(also inside aTuple) throwingUNKNOWN_ELEMENT_OF_ENUMorCANNOT_CONVERT_TYPEinstead of returningNULLor the default value when the number is not a value of theEnumor does not fit its type.accurateCastof a fractional number to anEnumnow throws instead of truncating it, and a number that does not fit anEnumset key inINis no longer a member.Description
createNumberToEnumWrapperignored the cast type and threw for every value it could not convert. UnderaccurateCastOrNullit now marks such rows as NULL in aNullableresult, the same way numeric conversions do, so the scalar,TupleandaccurateCastOrDefaultpaths all pick it up.CASTandaccurateCaststill throw.accurateCastnow also rejects a fractional number, like other accurate conversions. InternalaccurateOrNullcasts, such asINset keys, no longer take the oldtoEnumpath, which wrapped257to1. Withcheck_conversion_from_numbers_to_enum = 0,accurateCastOrNullskips theEnumvalue check, likeCASTdoes, but still returns NULL for a number that does not fit the type or is fractional. AStringthat is not an element is left to #119183. The new test fails on master (26.11.1.2511); I didn't build the patched server locally.Workflow [PR]
Sync PR [sync-upstream/pr/132256]