seafowl
seafowl copied to clipboard
Result JSON unsupported types
Arrow JSON writer that we use to format the output result of queries does not support all data types that Datafusion handles. For example:
$ curl -H "Content-Type: application/json" http://localhost:8080/q -d@-<<EOF
{"query": "CREATE TABLE test_table(dec_column NUMERIC, float_column REAL); SELECT column_name, data_type FROM information_schema.columns WHERE table_name = 'test_table'"}
EOF
{"column_name":"dec_column","data_type":"Decimal128(38, 10)"}
{"column_name":"float_column","data_type":"Float32"}
$ curl -H "Content-Type: application/json" http://localhost:8080/q -d@-<<EOF
{"query": "INSERT INTO test_table (float_column) VALUES (42.0); SELECT * FROM test_table"}
EOF
Arrow error: Json error: data type Decimal128(38, 10) not supported in nested map for json writer