Skip to content

Handle sets with a complex element type#1515

Merged
nwt merged 1 commit intomasterfrom
sets-with-complex-element
Oct 20, 2020
Merged

Handle sets with a complex element type#1515
nwt merged 1 commit intomasterfrom
sets-with-complex-element

Conversation

@nwt
Copy link
Member

@nwt nwt commented Oct 17, 2020

#1394 changed the zng specification to allow sets with a complex element type. This implements the change.

@nwt nwt merged commit 4b2b74d into master Oct 20, 2020
@nwt nwt deleted the sets-with-complex-element branch October 20, 2020 16:15
brim-bot pushed a commit to brimdata/zui that referenced this pull request Oct 20, 2020
This is an auto-generated commit with a zq dependency update. The zq PR
brimdata/super#1515, authored by @nwt,
has been merged.

Handle sets with a complex element type

brimdata/super#1394 changed the zng specification to allow sets with a complex element type. This implements the change.
brim-bot pushed a commit to brimdata/zui that referenced this pull request Oct 20, 2020
…arch filter" by nwt

This is an auto-generated commit with a zq dependency update. The zq PR
brimdata/super#1516, authored by @nwt,
has been merged.

Match record fields within complex types in ast.Search filter

Depends on brimdata/super#1515.

Closes brimdata/super#1223.
@philrz
Copy link
Contributor

philrz commented Oct 20, 2020

Verified in zq commit 702d877.

Here's how it looked as of commit 0060fed before we made the change:

$ cat input-sets.tzng 
#0:record[set_of_arrays:set[array[float64]]]
0:[[[1;2;][3;4;]]]
#1:record[set_of_sets:set[set[float64]]]
1:[[[1;2;][3;4;]]]
#2:record[set_of_records:set[record[foo:string]]]
2:[[[bar;][baz;]]]

$ zq -version
Version: v0.22.0-69-g0060fed

$ zq -t -i tzng input-sets.tzng 
input-sets.tzng: line 2: <set> (set[array[float64]]): expected primitive type, got container

Now in commit 702d877 that has the enhancement to support these:

$ zq -version
Version: v0.22.0-73-g702d877

$ zq -t -i tzng input-sets.tzng 
#0:record[set_of_arrays:set[array[float64]]]
0:[[[3;4;][1;2;]]]
#1:record[set_of_sets:set[set[float64]]]
1:[[[2;1;][3;4;]]]
#2:record[set_of_records:set[record[foo:string]]]
2:[[[bar;][baz;]]]

Thanks @nwt!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants