huaxingao commented on a change in pull request #29056:
URL: https://github.com/apache/spark/pull/29056#discussion_r456706603
##########
File path: docs/sql-ref-syntax-ddl-create-table-hiveformat.md
##########
@@ -36,6 +36,14 @@ CREATE [ EXTERNAL ] TABLE [ IF NOT EXISTS ] table_identifier
[ LOCATION path ]
[ TBLPROPERTIES ( key1=val1, key2=val2, ... ) ]
[ AS select_statement ]
+
+row_format:
+ : SERDE serde_class [WITH SERDEPROPERTIES (k1=v1, k2=v2, ...) ]
Review comment:
super nit: ```[WITH -> [ WITH```?
##########
File path: docs/sql-ref-syntax-ddl-create-table-hiveformat.md
##########
@@ -36,6 +36,14 @@ CREATE [ EXTERNAL ] TABLE [ IF NOT EXISTS ] table_identifier
[ LOCATION path ]
[ TBLPROPERTIES ( key1=val1, key2=val2, ... ) ]
[ AS select_statement ]
+
+row_format:
+ : SERDE serde_class [WITH SERDEPROPERTIES (k1=v1, k2=v2, ...) ]
+ | DELIMITED [ FIELDS TERMINATED BY fields_termiated_char [ ESCAPED BY
escaped_char] ]
Review comment:
```escaped_char] -> escaped_char ]```?
##########
File path: docs/sql-ref-syntax-qry-select-case.md
##########
@@ -0,0 +1,107 @@
+---
+layout: global
+title: CASE Clause
+displayTitle: CASE Clause
+license: |
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+---
+
+### Description
+
+`CASE` clause uses a rule to return specific result based on the specified
condition, similar to if/else statements in other programming languages.
+
+### Syntax
+
+```sql
+CASE [ expression ] { WHEN boolean_expression THEN then_expression } [ ... ]
+ [ ELSE else_expression ]
+END
+```
+
+### Parameters
+
+* **boolean_expression**
+
+ Specific specified condition, it should be boolean type.
+
+* **then_expression**
+
+ Specific the then expression based on the `boolean_expression` condition,
`then_expression` and `else_expression` should all be same type or coercible to
a common type.
Review comment:
you mean "Specifies the then expression..."?
##########
File path: docs/sql-ref-syntax-qry-select-groupby.md
##########
@@ -91,6 +93,18 @@ aggregate_name ( [ DISTINCT ] expression [ , ... ] ) [
FILTER ( WHERE boolean_ex
Filters the input rows for which the `boolean_expression` in the `WHERE`
clause evaluates
to true are passed to the aggregate function; other rows are discarded.
+* **FIRST**
+
+ `FIRST` select a first expression value from the data set, we can specific
`IGNORE NULLS` to ignore NULLS, it is optional.
Review comment:
I guess something like this
```
`FIRST` selects a first expression value from the data set. We can specify
an optional `IGNORE NULL` clause to ignore NULL values.
```
Probably also change the following sentences?
##########
File path: docs/sql-ref-syntax-qry-select-case.md
##########
@@ -0,0 +1,107 @@
+---
+layout: global
+title: CASE Clause
+displayTitle: CASE Clause
+license: |
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+---
+
+### Description
+
+`CASE` clause uses a rule to return specific result based on the specified
condition, similar to if/else statements in other programming languages.
+
+### Syntax
+
+```sql
+CASE [ expression ] { WHEN boolean_expression THEN then_expression } [ ... ]
+ [ ELSE else_expression ]
+END
+```
+
+### Parameters
+
+* **boolean_expression**
+
+ Specific specified condition, it should be boolean type.
Review comment:
I searched doc to see if this boolean_expression is defined somewhere. I
found these:
```
`boolean_expression`
Specifies an expression with a return type of boolean.
```
and
```
* **boolean_expression**
Specifies any expression that evaluates to a result type `boolean`. Two
or
more expressions may be combined together using the logical
operators ( `AND`, `OR` ).
```
I guess use one of them?
##########
File path: docs/sql-ref-syntax-qry-select-case.md
##########
@@ -0,0 +1,107 @@
+---
+layout: global
+title: CASE Clause
+displayTitle: CASE Clause
+license: |
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+---
+
+### Description
+
+`CASE` clause uses a rule to return specific result based on the specified
condition, similar to if/else statements in other programming languages.
+
+### Syntax
+
+```sql
+CASE [ expression ] { WHEN boolean_expression THEN then_expression } [ ... ]
+ [ ELSE else_expression ]
+END
+```
+
+### Parameters
+
+* **boolean_expression**
+
+ Specific specified condition, it should be boolean type.
+
+* **then_expression**
+
+ Specific the then expression based on the `boolean_expression` condition,
`then_expression` and `else_expression` should all be same type or coercible to
a common type.
+
+* **else_expression**
+
+ Specific the default expression, `then_expression` and `else_expression`
should all be same type or coercible to a common type.
Review comment:
Specifies?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]