Yupeng Fu
04/20/2021, 8:54 PMYupeng Fu
04/20/2021, 8:54 PMJackie
04/20/2021, 8:56 PMMap
or List
Jackie
04/20/2021, 8:57 PMMap
or List
Yupeng Fu
04/20/2021, 8:59 PMYupeng Fu
04/20/2021, 9:00 PMYupeng Fu
04/20/2021, 9:00 PMYupeng Fu
04/20/2021, 9:00 PMJackie
04/20/2021, 9:01 PMJackie
04/20/2021, 9:01 PMJackie
04/20/2021, 9:02 PMYupeng Fu
04/20/2021, 9:07 PMYupeng Fu
04/20/2021, 9:07 PMYupeng Fu
04/27/2021, 12:00 AMYupeng Fu
04/27/2021, 12:08 AMKishore G
Amrish Lal
04/29/2021, 10:54 PMAdding support for JSON has commonalities with adding support for complex data types (STRUCT, LIST, MAP) with the key difference between JSON and STRUCT/LIST/MAP support being that JSON will not enforce schema validation (in keeping with JSON standard) while as STRUCT/LIST/MAP will support schema validation. A table could be defined with both a JSON column and a STRUCT/LIST/MAP column. For example:
nestedColumn1 JSON,
nestedCOLUMN2 STRUCT (name : string, age: INT : salary : INT, addresses : LIST (STRUCT ( apt: int, street : string, city : string, zip : INT )))
The implementation steps that we describe under "Near Term Enhancements" are common to supporting both JSON and complex data types (STRUCT, LIST,
MAP). Both JSON and STRUCT/LIST/MAP columns:
-would be stored as text,
-would use JsonIndex for fast filtering (with additional support for multidimensional arrays)
-be queried via new dot/array based syntax as proposed in "Language enhancements"
In the long term it is quite possible that these data types share common hierarchical indexing functionality and storage mechanisms while providing JSON specific semantics with JSON column type and a more well-defined schema and type checking semantics with STRUCT/LIST/MAP type.
Amrish Lal
04/29/2021, 11:53 PMKishore G
Amrish Lal
05/01/2021, 5:30 PMselect jsoncolumn,json_extract_scalar(jsoncolumn, '$.person.companies[*].name', 'STRING') from jsontable where id = 106
which produces the results:
{"person":{"name":"daffy duck","companies":[{"name":"n1","title":"t1"},{"name":"n2","title":"t2"}]}}, ["n1","n2"]
What we would like to do is to rewrite this query from user query:
select jsoncolumn.person.companies[*].name from jsontable where id = 106
I believe by "unnesting" you are referring to the fact that ["n1","n2"]
could be separate rows in Pinot?
Also, for JSON storage support, we had briefly looked at BSON format (mongodb), JSON2 (derivative of BSON used in postgres), and OSON (used by oracle json database.). In either case, we were looking at a format that would help to minimizing parsing of json strings into json object before query evaluation as is being done in json_extract_scalar.Kishore G
Jackie
05/05/2021, 1:31 AMJackie
05/05/2021, 1:31 AMAmrish Lal
05/05/2021, 2:05 AMJSON_MATCH filter expression to be JSONPath compatibleNice
Sidd
05/05/2021, 6:18 AMAmrish Lal
05/05/2021, 4:17 PMBrad
12/11/2021, 6:19 PMSantiago Paz
05/05/2024, 3:43 AMSantiago Paz
05/05/2024, 3:43 AMSantiago Paz
05/05/2024, 3:44 AM