Skip to content

Commit 15da96c

Browse files
committed
Code review
1 parent c419b93 commit 15da96c

File tree

3 files changed

+29
-104
lines changed

3 files changed

+29
-104
lines changed

docs/sql-ref-datatypes.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -312,4 +312,4 @@ SELECT COUNT(*), c2 FROM test GROUP BY c2;
312312
| 2|-Infinity|
313313
| 3| Infinity|
314314
+---------+---------+
315-
{% endhighlight %}
315+
{% endhighlight %}

docs/sql-ref-datetime-pattern.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ Spark uses pattern letters in the following table for date and timestamp parsing
5656
|**X**|zone-offset 'Z' for zero|offset-X|Z; -08; -0830; -08:30; -083015; -08:30:15;|
5757
|**x**|zone-offset|offset-x|+0000; -08; -0830; -08:30; -083015; -08:30:15;|
5858
|**Z**|zone-offset|offset-Z|+0000; -0800; -08:00;|
59-
|**'**|escape for text|delimiter||
59+
|**'**|escape for text|delimiter| |
6060
|**''**|single quote|literal|'|
6161
|**[**|optional section start| | |
6262
|**]**|optional section end| | |

docs/sql-ref-null-semantics.md

Lines changed: 27 additions & 102 deletions
Original file line numberDiff line numberDiff line change
@@ -49,18 +49,18 @@ other `SQL` constructs.
4949
</style>
5050

5151
The following illustrates the schema layout and data of a table named `person`. The data contains `NULL` values in
52-
the `age` column and this table will be used in various examples in the sections below.
52+
the `age` column and this table will be used in various examples in the sections below.<br>
5353
**<u>TABLE: person</u>**
54-
<table class="tsclass" border="1">
55-
<tr><th>Id</th><th>Name</th><th>Age</th></tr>
56-
<tr><td>100</td><td>Joe</td><td>30</td></tr>
57-
<tr><td>200</td><td>Marry</td><td>NULL</td></tr>
58-
<tr><td>300</td><td>Mike</td><td>18</td></tr>
59-
<tr><td>400</td><td>Fred</td><td>50</td></tr>
60-
<tr><td>500</td><td>Albert</td><td>NULL</td></tr>
61-
<tr><td>600</td><td>Michelle</td><td>30</td></tr>
62-
<tr><td>700</td><td>Dan</td><td>50</td></tr>
63-
</table>
54+
55+
|Id |Name|Age|
56+
|---|----|---|
57+
|100|Joe|30|
58+
|200|Marry|NULL|
59+
|300|Mike|18|
60+
|400|Fred|50|
61+
|500|Albert|NULL|
62+
|600|Michelle|30|
63+
|700|Dan|50|
6464

6565
### Comparison Operators <a name="comp-operators"></a>
6666

@@ -71,48 +71,11 @@ equal operator ('<=>'), which returns `False` when one of the operand is `NULL`
7171
both the operands are `NULL`. The following table illustrates the behaviour of comparison operators when
7272
one or both operands are `NULL`:
7373

74-
<table class="tsclass" border="1">
75-
<tr>
76-
<th>Left Operand</th>
77-
<th>Right Operand</th>
78-
<th>></th>
79-
<th>>=</th>
80-
<th>=</th>
81-
<th><</th>
82-
<th><=</th>
83-
<th><=></th>
84-
</tr>
85-
<tr>
86-
<td>NULL</td>
87-
<td>Any value</td>
88-
<td>NULL</td>
89-
<td>NULL</td>
90-
<td>NULL</td>
91-
<td>NULL</td>
92-
<td>NULL</td>
93-
<td>False</td>
94-
</tr>
95-
<tr>
96-
<td>Any value</td>
97-
<td>NULL</td>
98-
<td>NULL</td>
99-
<td>NULL</td>
100-
<td>NULL</td>
101-
<td>NULL</td>
102-
<td>NULL</td>
103-
<td>False</td>
104-
</tr>
105-
<tr>
106-
<td>NULL</td>
107-
<td>NULL</td>
108-
<td>NULL</td>
109-
<td>NULL</td>
110-
<td>NULL</td>
111-
<td>NULL</td>
112-
<td>NULL</td>
113-
<td>True</td>
114-
</tr>
115-
</table>
74+
|Left Operand|Right Operand|> |>= |= |< |<= |<=>|
75+
|------------|--------------|---|---|---|---|---|---|
76+
|NULL|Any value|NULL|NULL|NULL|NULL|NULL|False|
77+
|Any value|NULL|NULL|NULL|NULL|NULL|NULL|False|
78+
|NULL|NULL|NULL|NULL|NULL|NULL|NULL|True|
11679

11780
### Examples
11881

@@ -157,55 +120,17 @@ as the arguments and return a `Boolean` value.
157120

158121
The following tables illustrate the behavior of logical operators when one or both operands are `NULL`.
159122

160-
<table class="tsclass" border="1">
161-
<tr>
162-
<th>Left Operand</th>
163-
<th>Right Operand</th>
164-
<th>OR</th>
165-
<th>AND</th>
166-
</tr>
167-
<tr>
168-
<td>True</td>
169-
<td>NULL</td>
170-
<td>True</td>
171-
<td>NULL</td>
172-
</tr>
173-
<tr>
174-
<td>False</td>
175-
<td>NULL</td>
176-
<td>NULL</td>
177-
<td>False</td>
178-
</tr>
179-
<tr>
180-
<td>NULL</td>
181-
<td>True</td>
182-
<td>True</td>
183-
<td>NULL</td>
184-
</tr>
185-
<tr>
186-
<td>NULL</td>
187-
<td>False</td>
188-
<td>NULL</td>
189-
<td>NULL</td>
190-
</tr>
191-
<tr>
192-
<td>NULL</td>
193-
<td>NULL</td>
194-
<td>NULL</td>
195-
<td>NULL</td>
196-
</tr>
197-
</table>
198-
<br>
199-
<table class="tsclass" border="1">
200-
<tr>
201-
<th>operand</th>
202-
<th>NOT</th>
203-
</tr>
204-
<tr>
205-
<td>NULL</td>
206-
<td>NULL</td>
207-
</tr>
208-
</table>
123+
|Left Operand|Right Operand|OR |AND|
124+
|------------|-------------|---|---|
125+
|True|NULL|True|NULL|
126+
|False|NULL|NULL|False|
127+
|NULL|True|True|NULL|
128+
|NULL|False|NULL|NULL|
129+
|NULL|NULL|NULL|NULL|
130+
131+
|operand|NOT|
132+
|-------|---|
133+
|NULL|NULL|
209134

210135
### Examples
211136

0 commit comments

Comments
 (0)