Kunal Siayg has uploaded this change for review. ( 
http://gerrit.cloudera.org:8080/23856


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,120 insertions(+), 4,892 deletions(-)



  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/56/23856/1
--
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: newchange
Gerrit-Change-Id: Ieafc6f6d4d44d4ed138f58dfcb147c36962136d2
Gerrit-Change-Number: 23856
Gerrit-PatchSet: 1
Gerrit-Owner: Kunal Siayg <[email protected]>

Reply via email to