IMPALA-11537: Query option validation for numeric types

This change adds a more generic approach to validate numeric
query options and report parse and validation errors.
Supported types: integers, floats, memory specifications.
Range and bound validator helper functions are added to make
validation unified on call sites.

Testing:
 - Error messages got more generic, therefore the existing tests
   around query options are aligned to match them

Change-Id: Ia7757b52393c094d2c661918d73cbfad7214f855
Reviewed-on: http://gerrit.cloudera.org:8080/19096
Reviewed-by: Impala Public Jenkins <impala-public-jenkins@cloudera.com>
Tested-by: Impala Public Jenkins <impala-public-jenkins@cloudera.com>
This commit is contained in:
Peter Rozsa
2022-09-22 16:24:27 +02:00
committed by Impala Public Jenkins
parent 15b07ff1fb
commit 97a506c656
5 changed files with 615 additions and 568 deletions

View File

@@ -477,6 +477,8 @@ error_codes = (
("JWT_VERIFY_FAILED", 154, "Error verifying JWT Token: $0."),
("PARQUET_ROWS_SKIPPING", 155, "Couldn't skip rows in column '$0' in file '$1'."),
("QUERY_OPTION_PARSE_FAILED", 156, "Failed to parse query option '$0': $1")
)
import sys