-
Notifications
You must be signed in to change notification settings - Fork 67
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
zq: Call user-defined op with source (#4808)
The change allows zq users to start a query with a call to a user-defined op that contains a source (file) with no additional input sources. Previously attempting to do this would result in error "redundant inputs".
- Loading branch information
Showing
4 changed files
with
73 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
script: | | ||
zq -z -I countfile.zed 'countfile()' | ||
inputs: | ||
- name: countfile.zed | ||
data: | | ||
op countfile(): ( | ||
file test.zson | count() | ||
) | ||
- name: test.zson | ||
data: '{} {} {} {}' | ||
|
||
outputs: | ||
- name: stdout | ||
data: | | ||
4(uint64) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters