Skip to content

Can Array<T> accept null value for JSON-like formats ? #2633

@jimmykuo

Description

@jimmykuo

These are valid in standard JSON https://www.json.org/

{"friends":[]} 
{"friends":null}

the datatype is Array(String), it will get exceptions when consuming

CREATE TABLE IF NOT EXISTS event(
  friends Array(String)
) ENGINE = Kafka('localhost:9092', 'topic', 'group', 'JSONEachRow');

it's better if null can be deserialized as empty Array

Thank you.

Metadata

Metadata

Assignees

Labels

comp-formatsInput/output formats (CSV/JSON/Parquet/ORC/Arrow/Protobuf/etc.).feature

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions