-
Notifications
You must be signed in to change notification settings - Fork 71
Expand file tree
/
Copy pathcount.yaml
More file actions
56 lines (54 loc) · 1.75 KB
/
count.yaml
File metadata and controls
56 lines (54 loc) · 1.75 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
script: |
super -s -c 'values {x:1},{x:2} | count'
echo // ===
super -s -c 'values null,null | count {count}'
echo // ===
super -s -c 'values {x:1},{x:2} | count {...this,row_number}'
echo // ===
super -s -c 'values {x:1,y:1},{x:2,y:2} | count {x,row_number}'
echo // ===
super -s -c 'values [1,2],[3,4] | unnest this into ( count {val:this,c} )'
! super -s -c 'values null | count | count := count+"hello"'
>&2 echo // ===
! super -s -c 'values {x:"foo"} | count {...this,row} | x := x+1'
>&2 echo // ===
! super -s -c 'values {x:"foo"} | count {...this}'
>&2 echo // ===
! super -s -c 'count {foo:"foo",1}'
vector: true
outputs:
- name: stdout
data: |
{that:{x:1},count:1::uint64}
{that:{x:2},count:2::uint64}
// ===
{count:1::uint64}
{count:2::uint64}
// ===
{x:1,row_number:1::uint64}
{x:2,row_number:2::uint64}
// ===
{x:1,row_number:1::uint64}
{x:2,row_number:2::uint64}
// ===
{val:1,c:1::uint64}
{val:2,c:2::uint64}
{val:3,c:1::uint64}
{val:4,c:2::uint64}
- name: stderr
data: |
type mismatch at line 1, column 32:
values null | count | count := count+"hello"
~~~~~~~~~~~~~
// ===
type mismatch at line 1, column 47:
values {x:"foo"} | count {...this,row} | x := x+1
~~~
// ===
last element in record expression for count must be an identifier at line 1, column 27:
values {x:"foo"} | count {...this}
~~~~~~~
// ===
last element in record expression for count must be an identifier at line 1, column 18:
count {foo:"foo",1}
~