Skip to content

Result JSON unsupported types #393

@gruuya

Description

@gruuya

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions