Details
-
Improvement
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
1.11.0
Description
Add session options to allow drill working with non standard json strings number literals like: NaN, Infinity, -Infinity. By default these options will be switched off, the user will be able to toggle them during working session.
For documentation
1. Added two session options store.json.reader.allow_nan_inf and store.json.writer.allow_nan_inf that allow to read/write NaN and Infinity as numbers. By default these options are set to true.
2. Extended signature of convert_toJSON and convert_fromJSON functions by adding second optional parameter that enables read/write NaN and Infinity.
For example:
select convert_fromJSON('{"key": NaN}') from (values(1)); will result with JsonParseException, but select convert_fromJSON('{"key": NaN}', true) from (values(1)); will parse NaN as a number.
3. Added unit tests, including tests for math functions.
Attachments
Issue Links
- causes
-
DRILL-6120 NaN/Infinity: some functions don't work as expected
- Open
-
DRILL-6121 Nan/Inf data types: strange query result with INNER JOIN operator when selecting 1 column
- Open
-
DRILL-6122 Order by clause works inconsistently when sorting columns with NaN
- Open
- is a parent of
-
DRILL-6018 Drill can't handle NaN, Infinity literals
- Open
- links to