Hello Impala Public Jenkins,
I'd like you to reexamine a change. Please visit
http://gerrit.cloudera.org:8080/23856
to look at the new patch set (#2).
Change subject: IMPALA-12918: Validate numeric values for table stats properties
......................................................................
IMPALA-12918: Validate numeric values for table stats properties
Adds validation to reject non-numeric values (including empty strings)
for numRows, totalSize, and rawDataSize table properties during
ALTER TABLE SET TBLPROPERTIES operations.
Previously, Impala allowed setting these properties to any string value,
which could cause NumberFormatException errors in downstream applications
like Spark when they tried to parse these values.
Changes:
- Added analyzeTableStatsProperties() method in AlterTableSetTblProperties.java
that validates these properties contain parseable long values
- Added corresponding test cases in AnalyzeDDLTest.java
- Added new test file TableStatsValidationBugTest.java with comprehensive tests
Testing:
- All validation logic verified with unit tests
- Tested that empty strings, non-numeric values, and whitespace-only values
are correctly rejected with clear error messages
- Tested that valid numeric values (including 0, -1, positive numbers) pass
Example error messages:
- "Table property 'numRows' must have a valid numeric value, got empty value."
- "Table property 'numRows' must have a valid numeric value, got 'abc'."
Change-Id: Ieafc6f6d4d44d4ed138f58dfcb147c36962136d2
---
M fe/src/main/java/org/apache/impala/analysis/AlterTableSetTblProperties.java
M fe/src/test/java/org/apache/impala/analysis/AnalyzeDDLTest.java
A fe/src/test/java/org/apache/impala/analysis/TableStatsValidationBugTest.java
3 files changed, 5,197 insertions(+), 4,914 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/56/23856/2
--
To view, visit http://gerrit.cloudera.org:8080/23856
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ieafc6f6d4d44d4ed138f58dfcb147c36962136d2
Gerrit-Change-Number: 23856
Gerrit-PatchSet: 2
Gerrit-Owner: Kunal Siyag <[email protected]>
Gerrit-Reviewer: Impala Public Jenkins <[email protected]>