fix(core): fix a bug where default ILP decimal wouldn't be null#6454
fix(core): fix a bug where default ILP decimal wouldn't be null#6454bluestreak01 merged 3 commits intomasterfrom
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the WalkthroughStandardizes NULL value representation for decimal columns by replacing primitive MIN_VALUE sentinels with dedicated Decimals constants in TableWriter and WalWriter classes. A test method validates decimal column default value behavior in line protocol inserts. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes
Suggested labels
Suggested reviewers
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
@CodeRabbit review |
✅ Actions performedReview triggered.
|
…ineHttpSender and LineTcpSender
|
@RaphDal please submit Ent tandem PR |
|
tandem should pass CI |
[PR Coverage check]😍 pass : 12 / 12 (100.00%) file detail
|
This pull request updates how null/default values for decimal types are handled in both
TableWriterandWalWriter, switching from hardcoded primitive constants to centralized constants in theDecimalsclass. It also adds a new test to ensure that decimal columns default to null values when not provided. These changes improve consistency, maintainability, and correctness in handling decimal nulls.Decimal null value handling improvements:
Byte.MIN_VALUE,Short.MIN_VALUE, etc.) withDecimalsclass constants (e.g.,Decimals.DECIMAL8_NULL,Decimals.DECIMAL16_NULL, etc.) for all decimal types in theconfigureNullSettersmethods of bothTableWriterandWalWriter. This ensures a single source of truth for decimal null representations and reduces the risk of errors if null values change in the future. [1] [2]Decimalsclass in bothTableWriter.javaandWalWriter.javato support the above change. [1] [2]Testing improvements:
testDecimalDefaultValuesinLineHttpSenderTest.javato verify that decimal columns are set to their default null values when not explicitly provided in the input. This test creates a table with various decimal columns, inserts a row without specifying decimal values, and asserts that the resulting row has nulls in all decimal columns.