mlsql-api-console icon indicating copy to clipboard operation
mlsql-api-console copied to clipboard

Expanded json contains incrorect value

Open chncaesar opened this issue 3 years ago • 0 comments

Description

Running the following code snippet to expand json {"key": "value", "key_2":"value_2"}.

SELECT '{"key": "value", "key_2":"value_2"}' AS col_1
, "hangzhou" AS city
AS table_1;
run table_1 as JsonExpandExt.`` where inputCol="col_1" AND samplingRatio="1.0" as result;

The result should be:

key key_2 city
value value_2 hangzhou

Actual result is:

key key_2 city
0 value_2 hangzhou

Note that value becomes 0 in key column.

chncaesar avatar Sep 13 '21 06:09 chncaesar