Files
impala/testdata/data/json_test/overflow.json
Eyizoha 4e8555031b IMPALA-12957: Support reading Inf and NaN from JSON
Despite the fact that special values such as Inf and NaN are not
supported in standard JSON (they are considered invalid values),
rapidjson does support them. However, it requires the parsing flag
'kParseNanAndInfFlag' to be enabled.
This patch enables the flag to allows JsonParser to parse special
numbers like Inf and NaN. Corresponding modifications have also been
made to JsonSkipper to maintain consistent behavior when zero slots
scans.
Additionally, due to a minor issue in rapidjson v1.1.0 when parsing Inf
and NaN, this patch also updates the rapidjson version to include the
corresponding fix (see https://gerrit.cloudera.org/#/c/21980/).

Testing:
  - Added and passed relevant test cases (BE, E2E).

Change-Id: I05ee7c7c7fb7e78fff9570f659ce2d13c94a4e10
Reviewed-on: http://gerrit.cloudera.org:8080/21701
Reviewed-by: Impala Public Jenkins <impala-public-jenkins@cloudera.com>
Tested-by: Impala Public Jenkins <impala-public-jenkins@cloudera.com>
2024-11-11 00:09:08 +00:00

9 lines
1.8 KiB
JSON

{"tinyint_col":1,"smallint_col":2,"int_col":3,"bigint_col":4,"float_col":5.5,"double_col":6.6,"decimal0_col":123456789.1234,"decimal1_col":99999999999999999999999999999999999999,"decimal2_col":0.00000000000000000000000000000000000001}
{"tinyint_col":1000,"smallint_col":100000,"int_col":10000000000000000,"bigint_col":10000000000000000000,"float_col":1e1000000,"double_col":1e10000,"decimal0_col":1234567890.1234,"decimal1_col":100000000000000000000000000000000000000,"decimal2_col":0.000000000000000000000000000000000000009}
{"tinyint_col":-1000,"smallint_col":-100000,"int_col":-10000000000000000,"bigint_col":-10000000000000000000,"float_col":-1e1000000,"double_col":-1e10000,"decimal0_col":-123456789.12341,"decimal1_col":-100000000000000000000000000000000000000,"decimal2_col":-0.000000000000000000000000000000000000009}
{"tinyint_col":"1","smallint_col":"2","int_col":"3","bigint_col":"4","float_col":"5.5","double_col":"6.6","decimal0_col":"123456789.1234","decimal1_col":"99999999999999999999999999999999999999","decimal2_col":"0.00000000000000000000000000000000000001"}
{"tinyint_col":"1000","smallint_col":"100000","int_col":"10000000000000000","bigint_col":"10000000000000000000","float_col":"1e1000000","double_col":"1e10000","decimal0_col":"1234567890.1234","decimal1_col":"100000000000000000000000000000000000000","decimal2_col":"0.000000000000000000000000000000000000009"}
{"tinyint_col":"-1000","smallint_col":"-100000","int_col":"-10000000000000000","bigint_col":"-10000000000000000000","float_col":"-1e1000000","double_col":"-1e10000","decimal0_col":"-123456789.12341","decimal1_col":"-100000000000000000000000000000000000000","decimal2_col":"-0.000000000000000000000000000000000000009"}
{"float_col":NaN,"double_col":-NaN}
{"float_col":Inf,"double_col":-Inf}
{"float_col":Infinity,"double_col":-Infinity}