Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions compiler/ztests/aggregate.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,5 @@ input: |
{_path:"dns"}
{_path:"conn"}

output-flags: -pretty=0

output: |
2
2 changes: 1 addition & 1 deletion compiler/ztests/pragma-index-base-slice.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ spq: |
)
| sort s
input-flags: -dynamic
flags: -dynamic

input: |
{a:[1,2,3],from:1,to:3}
Expand Down
2 changes: 0 additions & 2 deletions compiler/ztests/summarize.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,5 @@ input: |
{_path:"dns"}
{_path:"conn"}

output-flags: -pretty=0

output: |
2
8 changes: 4 additions & 4 deletions runtime/sam/expr/expr_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ func testSuccessful(t *testing.T, e, input, expected string) {
input = "{}"
}
zt := ztest.ZTest{
SPQ: fmt.Sprintf("values %s", e),
Input: &input,
InputFlags: "-dynamic",
Output: expected + "\n",
SPQ: fmt.Sprintf("values %s", e),
Flags: "-dynamic",
Input: &input,
Output: expected + "\n",
}
if err := zt.RunInternal(t.Context()); err != nil {
t.Fatal(err)
Expand Down
2 changes: 1 addition & 1 deletion runtime/ztests/expr/arith-errors.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ output: |

spq: this+1

input-flags: -dynamic
flags: -dynamic

input: |
none
Expand Down
2 changes: 1 addition & 1 deletion runtime/ztests/expr/array-bounds-2.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
spq: cut m1:=is_error(a[-1]),m2:=is_error(a[4])

input-flags: -dynamic
flags: -dynamic

input: |
{x:[1,2,3],i:1::uint16}
Expand Down
2 changes: 1 addition & 1 deletion runtime/ztests/expr/array-bounds.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
spq: put b:=is_error(a[2])

input-flags: -dynamic
flags: -dynamic

input: |
{a:[1,2,3]}
Expand Down
2 changes: 1 addition & 1 deletion runtime/ztests/expr/dot-record-type.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
spq: values foo, foo.bar

input-flags: -dynamic
flags: -dynamic

input: |
<{foo:{bar:int64}}>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
spq: is_error(t)

input-flags: -dynamic
flags: -dynamic

input: &input |
{s:"A=B"}
Expand Down
4 changes: 2 additions & 2 deletions runtime/ztests/expr/function/parse-uri.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
spq: uri := parse_uri(s)

flags: -pretty 2

input: |
{s:""}
{s:"scheme://user:password@host:12345/path?a=1&a=2&b=3&c=#fragment"}
Expand All @@ -10,8 +12,6 @@ input: |
{s:":no-scheme"}
{s:"scheme://bad-port:1234567"}

output-flags: -pretty=2

output: |
{
s: "",
Expand Down
4 changes: 2 additions & 2 deletions runtime/ztests/expr/function/upcast.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ output: |
spq: |
upcast(this[0], this[1])

flags: -fusion

input: |
[[1,"a"],<[int8|string]>]
[[1::int8,"a"],<[int8|string]>]
Expand Down Expand Up @@ -59,8 +61,6 @@ input: |
type n101=int64
[1::n101,<fusion(n101|string)>]

output-flags: -fusion

output: |
error({message:"upcast: value not a subtype of [int8|string]",on:[1,"a"]})
[1::int8,"a"]
Expand Down
4 changes: 2 additions & 2 deletions runtime/ztests/expr/fusion-all.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
spq: upcast(this,<any>)

flags: -fusion

# note: the syntax for fusion values will change from bytes to values soon
# and this test will be updated

Expand All @@ -9,8 +11,6 @@ input: |
{x:1}
<string>
output-flags: -fusion

output: |
1::any
"foo"::any
Expand Down
2 changes: 1 addition & 1 deletion runtime/ztests/expr/math-incompatible.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
spq: |
values a+b, a-b, a*b, a/b, a%b
input-flags: -dynamic
flags: -dynamic

input: |
{a:[1,2],b:[3,4]}
Expand Down
2 changes: 1 addition & 1 deletion runtime/ztests/expr/rec-expr-opt.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ output: |

spq: values {x?:this}

input-flags: -dynamic
flags: -dynamic

input: |
none
Expand Down
2 changes: 1 addition & 1 deletion runtime/ztests/expr/slice-array.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
spq: "values c[start:end]"

input-flags: -dynamic
flags: -dynamic

input: |
{start:null,end:-1,c:[1,2,3,4]}
Expand Down
2 changes: 1 addition & 1 deletion runtime/ztests/expr/slice-set.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
spq: "values c[start:end]"

input-flags: -dynamic
flags: -dynamic

input: |
{start:null,end:-1,c:set[1,2,3,4]}
Expand Down
4 changes: 2 additions & 2 deletions runtime/ztests/expr/slice.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
spq: "cut a1:=a[1:-1],a2:=a[1:],a3:=a[:1],a4:=a[:-1],a5:=a[:-100],a6:=a[-1:],a7:=a[-2:-1],a8:=(a IS NOT NULL and len(a)>0) ? a[:a[1]-9] : null"

input-flags: -dynamic
flags: -dynamic

input: |
{a:null}
Expand Down Expand Up @@ -31,7 +31,7 @@ output: |
# Test slice on union and fusion values
spq: this[1:]

input-flags: -dynamic
flags: -dynamic

input: |
[1,2,3]::(null|[int64])
Expand Down
4 changes: 2 additions & 2 deletions runtime/ztests/op/aggregate/collect_map.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
spq: "collect_map(map{stock: price})"

output-flags: -pretty 2
flags: -pretty 2

input: |
{stock:"APPL",price:150.94}
Expand All @@ -24,7 +24,7 @@ output: |
# Test union values
spq: "collect_map(map{k:v})"

output-flags: -pretty 2
flags: -pretty 2

input: |
// Named type and union type.
Expand Down
4 changes: 2 additions & 2 deletions runtime/ztests/op/aggregate/count-assign.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
spq: c:=count()

flags: -f table

input: |
{_path:"conn",foo:"1"}
{_path:"conn",foo:"2"}
Expand All @@ -12,8 +14,6 @@ input: |
{_path:"conn",foo:"9"}
{_path:"conn",foo:"10"}

output-flags: -f table

output: |
c
10
4 changes: 2 additions & 2 deletions runtime/ztests/op/aggregate/named-values.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
spq: count(), sum(this), min(this), max(this), avg(this), collect(this), any(this), dcount(this)

flags: -pretty 4

input: |
type named=int64
1::named
2::named
output-flags: -pretty=4

output: |
type named = int64
{
Expand Down
2 changes: 1 addition & 1 deletion runtime/ztests/op/aggregate/not-present.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
spq: max(val) by key | sort

input-flags: -dynamic
flags: -dynamic

input: |
{key:"key1"}
Expand Down
2 changes: 1 addition & 1 deletion runtime/ztests/op/cut-foo-bar-only.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
spq: cut foo

input-flags: -dynamic
flags: -dynamic

input: |
{bar:"bar1"}
Expand Down
2 changes: 1 addition & 1 deletion runtime/ztests/op/drop-boo.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
spq: drop boo

input-flags: -dynamic
flags: -dynamic

input: &input |
{foo:"foo1"}
Expand Down
2 changes: 1 addition & 1 deletion runtime/ztests/op/drop-non-record.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
spq: drop x

input-flags: -dynamic
flags: -dynamic

input: |
1
Expand Down
Loading
Loading