Repository navigation
Add compat fixtures for old decimal forms - #10753
connortsui20 wants to merge 4 commits into
Conversation
Signed-off-by: Connor Tsui <connor.tsui20@gmail.com>
Signed-off-by: Connor Tsui <connor.tsui20@gmail.com>
Signed-off-by: Connor Tsui <connor.tsui20@gmail.com>
Signed-off-by: Connor Tsui <connor.tsui20@gmail.com>
Merging this PR will degrade performance by 0.45%4 warnings, 1 note
Warning Please fix the performance issues or acknowledge them on CodSpeed. Performance Changes
Tip Investigate this regression by commenting Comparing Footnotes
|
|
honestly I have no idea if these changes are correct, am not familiar with how these fixtures are supposed to work |
Summary
Adds compat fixtures for the old decimal forms that current writers still produce: decimals stored narrower than the canonical width of their precision (including values that need the next precision, and high scales), decimals stored wider, nonzero values in null slots, and DecimalByteParts with narrow and wide most significant parts. A release must publish these files before #10701 changes how old decimal arrays read, so that the new read path is checked against real old files.
Changes
A flat fixture can now override
build_written()to write a physical form thatbuild()must not return.generateandpublishwritebuild_written(), andcheckcompares each published file withbuild(), which returns canonical arrays only. So the published file keeps the old form while the expected array never changes. The overrides work only whileDecimalArray::try_newaccepts a non-canonical width. Once it rejects one, the overrides must be deleted, and the files published before that keep the old forms.DESIGN.mddocuments the hook.The new tests check that every decimal in
build()has the canonical width and that every written column keeps its stored width through a file round trip. That round-trip check reads with the current reader, so the change in #10701 that converts old decimal arrays on read must update it. Until a release publishes the new fixtures,compat.py check --mode lastskips them.🤖 Generated with Claude Code