Skip to content

Commit 289e5ae

Browse files
committed
address comments
1 parent 66d82ca commit 289e5ae

9 files changed

+26
-25
lines changed

docs/sql-ref-ansi-compliance.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ When `spark.sql.ansi.enabled` is set to `true` and an overflow occurs in numeric
6969
```sql
7070
-- `spark.sql.ansi.enabled=true`
7171
SELECT 2147483647 + 1;
72-
java.lang.ArithmeticException: integer overflow
72+
java.lang.ArithmeticException: integer overflow
7373

7474
-- `spark.sql.ansi.enabled=false`
7575
SELECT 2147483647 + 1;
@@ -94,10 +94,10 @@ In future releases, the behaviour of type coercion might change along with the o
9494

9595
-- `spark.sql.ansi.enabled=true`
9696
SELECT CAST('a' AS INT);
97-
java.lang.NumberFormatException: invalid input syntax for type numeric: a
97+
java.lang.NumberFormatException: invalid input syntax for type numeric: a
9898

9999
SELECT CAST(2147483648L AS INT);
100-
java.lang.ArithmeticException: Casting 2147483648 to int causes overflow
100+
java.lang.ArithmeticException: Casting 2147483648 to int causes overflow
101101

102102
-- `spark.sql.ansi.enabled=false` (This is a default behaviour)
103103
SELECT CAST('a' AS INT);
@@ -119,8 +119,8 @@ CREATE TABLE t (v INT);
119119

120120
-- `spark.sql.storeAssignmentPolicy=ANSI`
121121
INSERT INTO t VALUES ('1');
122-
org.apache.spark.sql.AnalysisException: Cannot write incompatible data to table '`default`.`t`':
123-
- Cannot safely cast 'v': StringType to IntegerType;
122+
org.apache.spark.sql.AnalysisException: Cannot write incompatible data to table '`default`.`t`':
123+
- Cannot safely cast 'v': StringType to IntegerType;
124124

125125
-- `spark.sql.storeAssignmentPolicy=LEGACY` (This is a legacy behaviour until Spark 2.x)
126126
INSERT INTO t VALUES ('1');

docs/sql-ref-identifier.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,16 +57,16 @@ Note: If `spark.sql.ansi.enabled` is set to true, ANSI SQL reserved keywords can
5757
```sql
5858
-- This CREATE TABLE fails with ParseException because of the illegal identifier name a.b
5959
CREATE TABLE test (a.b int);
60-
org.apache.spark.sql.catalyst.parser.ParseException:
61-
no viable alternative at input 'CREATE TABLE test (a.'(line 1, pos 20)
60+
org.apache.spark.sql.catalyst.parser.ParseException:
61+
no viable alternative at input 'CREATE TABLE test (a.'(line 1, pos 20)
6262

6363
-- This CREATE TABLE works
6464
CREATE TABLE test (`a.b` int);
6565

6666
-- This CREATE TABLE fails with ParseException because special character ` is not escaped
6767
CREATE TABLE test1 (`a`b` int);
68-
org.apache.spark.sql.catalyst.parser.ParseException:
69-
no viable alternative at input 'CREATE TABLE test (`a`b`'(line 1, pos 23)
68+
org.apache.spark.sql.catalyst.parser.ParseException:
69+
no viable alternative at input 'CREATE TABLE test (`a`b`'(line 1, pos 23)
7070
7171
-- This CREATE TABLE works
7272
CREATE TABLE test (`a``b` int);

docs/sql-ref-literals.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,12 @@ A string literal is used to specify a character string value.
3636
#### Syntax
3737

3838
```sql
39-
'c [ ... ]' | "c [ ... ]"
39+
'char [ ... ]' | "char [ ... ]"
4040
```
4141

4242
#### Parameters
4343

44-
* **c**
44+
* **char**
4545

4646
One character from the character set. Use `\` to escape special characters (e.g., `'` or `\`).
4747

@@ -77,14 +77,14 @@ A binary literal is used to specify a byte sequence value.
7777
#### Syntax
7878
7979
```sql
80-
X { 'c [ ... ]' | "c [ ... ]" }
80+
X { 'num [ ... ]' | "num [ ... ]" }
8181
```
8282
8383
#### Parameters
8484
85-
* **c**
85+
* **num**
8686
87-
One character from the character set.
87+
Any hexadecimal number from 0 to F.
8888
8989
#### Examples
9090

docs/sql-ref-syntax-aux-show-table.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -170,8 +170,8 @@ SHOW TABLE EXTENDED IN default LIKE `employee` PARTITION (`grade=1`);
170170

171171
-- show partition file system details with regex fails as shown below
172172
SHOW TABLE EXTENDED IN default LIKE `empl*` PARTITION (`grade=1`);
173-
Error: Error running query: org.apache.spark.sql.catalyst.analysis.NoSuchTableException:
174-
Table or view 'emplo*' not found in database 'default'; (state=,code=0)
173+
Error: Error running query: org.apache.spark.sql.catalyst.analysis.NoSuchTableException:
174+
Table or view 'emplo*' not found in database 'default'; (state=,code=0)
175175
```
176176

177177
### Related Statements

docs/sql-ref-syntax-ddl-drop-function.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,9 +79,9 @@ DROP FUNCTION test_avg;
7979

8080
-- Try to drop Permanent function which is not present
8181
DROP FUNCTION test_avg;
82-
Error: Error running query:
83-
org.apache.spark.sql.catalyst.analysis.NoSuchPermanentFunctionException:
84-
Function 'default.test_avg' not found in database 'default'; (state=,code=0)
82+
Error: Error running query:
83+
org.apache.spark.sql.catalyst.analysis.NoSuchPermanentFunctionException:
84+
Function 'default.test_avg' not found in database 'default'; (state=,code=0)
8585

8686
-- List the functions after dropping, it should list only temporary function
8787
SHOW USER FUNCTIONS;

docs/sql-ref-syntax-ddl-drop-table.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,8 @@ DROP TABLE userdb.employeetable;
5656
-- Assumes a table named `employeetable` does not exists.
5757
-- Throws exception
5858
DROP TABLE employeetable;
59-
Error: org.apache.spark.sql.AnalysisException: Table or view not found: employeetable;
60-
(state=,code=0)
59+
Error: org.apache.spark.sql.AnalysisException: Table or view not found: employeetable;
60+
(state=,code=0)
6161

6262
-- Assumes a table named `employeetable` does not exists,Try with IF EXISTS
6363
-- this time it will not throw exception

docs/sql-ref-syntax-ddl-drop-view.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,8 @@ DROP VIEW userdb.employeeView;
5353
-- Assumes a view named `employeeView` does not exists.
5454
-- Throws exception
5555
DROP VIEW employeeView;
56-
Error: org.apache.spark.sql.AnalysisException: Table or view not found: employeeView;
57-
(state=,code=0)
56+
Error: org.apache.spark.sql.AnalysisException: Table or view not found: employeeView;
57+
(state=,code=0)
5858

5959
-- Assumes a view named `employeeView` does not exists,Try with IF EXISTS
6060
-- this time it will not throw exception

docs/sql-ref-syntax-qry-select-limit.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ SELECT name, age FROM person ORDER BY name LIMIT length('SPARK');
9191

9292
-- A non-foldable expression as an input to LIMIT is not allowed.
9393
SELECT name, age FROM person ORDER BY name LIMIT length(name);
94-
org.apache.spark.sql.AnalysisException: The limit expression must evaluate to a constant value ...
94+
org.apache.spark.sql.AnalysisException: The limit expression must evaluate to a constant value ...
9595
```
9696

9797
### Related Statements

docs/sql-ref-syntax-qry-select-usedb.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,8 @@ USE userdb;
4646

4747
-- Use the 'userdb1' which doesn't exist
4848
USE userdb1;
49-
Error: org.apache.spark.sql.catalyst.analysis.NoSuchDatabaseException: Database 'userdb1' not found;(state=,code=0)
49+
Error: org.apache.spark.sql.catalyst.analysis.NoSuchDatabaseException: Database 'userdb1' not found;
50+
(state=,code=0)
5051
```
5152

5253
### Related Statements

0 commit comments

Comments
 (0)