Skip to content

Commit a3c31a5

Browse files
authored
Convert single null #input sections to empty (#6376)
1 parent 000275e commit a3c31a5

File tree

25 files changed

+50
-50
lines changed

25 files changed

+50
-50
lines changed

book/src/super-sql/declarations/constants.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ const ABC = [
4545
]
4646
values ABC
4747
# input
48-
null
48+
4949
# expected output
5050
["A","B","C"]
5151
```

book/src/super-sql/declarations/functions.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ _A simple recursive function_
115115
fn fact(n): n<=1 ? 1 : n*fact(n-1)
116116
values fact(5)
117117
# input
118-
null
118+
119119
# expected output
120120
120
121121
```
@@ -176,7 +176,7 @@ fn apply(a,val): (
176176
)
177177
values apply([1,2,3], 1)
178178
# input
179-
null
179+
180180
# expected output
181181
"val" no such field at line 3, column 18:
182182
| collect(this+val)
@@ -193,7 +193,7 @@ fn apply(a,val): (
193193
)
194194
values apply([1,2,3], 1)
195195
# input
196-
null
196+
197197
# expected output
198198
[2,3,4]
199199
```

book/src/super-sql/declarations/queries.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ _Simplest named query_
4444
let hello = (values 'hello, world')
4545
from hello
4646
# input
47-
null
47+
4848
# expected output
4949
"hello, world"
5050
```
@@ -58,7 +58,7 @@ _Use an array subquery if multiple values expected_
5858
let q = (values 1,2,3)
5959
values [q]
6060
# input
61-
null
61+
6262
# expected output
6363
[1,2,3]
6464
```
@@ -74,7 +74,7 @@ let q2 = (values 3,4)
7474
let q3 = (values 5)
7575
values {a:[q1],b:[q2],c:q3}
7676
# input
77-
null
77+
7878
# expected output
7979
{a:[1,2,3],b:[3,4],c:5}
8080
```

book/src/super-sql/expressions/arithmetic.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ where `<expr>` is any [expression](intro.md) that results in a number type.
2424
# spq
2525
values 2*3+1, 11%5, 1/0, "foo"+"bar", +1, -1
2626
# input
27-
null
27+
2828
# expected output
2929
7
3030
1

book/src/super-sql/expressions/cast.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ values
225225
cast(80::uint16, 'port'),
226226
cast(cast(80, <uint16>), 'port')
227227
# input
228-
null
228+
229229
# expected output
230230
80::(port=uint16)
231231
80::(port=uint16)

book/src/super-sql/expressions/comparisons.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ _Various scalar comparisons_
8282
# spq
8383
values 1 > 2, 1 < 2, "b" > "a", 1 > "a", 1 > x
8484
# input
85-
null
85+
8686
# expected output
8787
false
8888
true

book/src/super-sql/expressions/concat.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ _Cast non-string values to concatenate_
3636
# spq
3737
values "foo" || 123::string
3838
# input
39-
null
39+
4040
# expected output
4141
"foo123"
4242
```

book/src/super-sql/expressions/exists.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ _Simple example showing true for non-empty result_
2222
# spq
2323
values exists (values 1,2,3)
2424
# input
25-
null
25+
2626
# expected output
2727
true
2828
```
@@ -40,7 +40,7 @@ WHERE EXISTS (
4040
FROM Orders
4141
)
4242
# input
43-
null
43+
4444
# expected output
4545
{s:"there are orders in the system"}
4646
```

book/src/super-sql/expressions/functions.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ _Sample calls to various built-in functions_
8585
# spq
8686
values pow(2,3), lower("ABC")+upper("def"), typeof(1)
8787
# input
88-
null
88+
8989
# expected output
9090
8.
9191
"abcDEF"
@@ -100,7 +100,7 @@ _Calling a lambda function_
100100
# spq
101101
values lambda x:x+1 (2)
102102
# input
103-
null
103+
104104
# expected output
105105
3
106106
```
@@ -113,7 +113,7 @@ _Passing a lambda function_
113113
fn square(g,val):g(val)*g(val)
114114
values square(lambda x:x+1, 2)
115115
# input
116-
null
116+
117117
# expected output
118118
9
119119
```
@@ -150,7 +150,7 @@ _Function references may not be assigned to super-structured values_
150150
fn f():null
151151
values {x:&f}
152152
# input
153-
null
153+
154154
# expected output
155155
parse error at line 2, column 11:
156156
values {x:&f}

book/src/super-sql/expressions/inputs.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ let input = (
120120
)
121121
SELECT x FROM input
122122
# input
123-
null
123+
124124
# expected output
125125
{x:1}
126126
{x:2}

0 commit comments

Comments
 (0)