Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
fix errors
  • Loading branch information
huaxingao committed May 5, 2020
commit bd82fdd6d132020a72d8f1ed3f4327e3b334555b
2 changes: 1 addition & 1 deletion docs/sql-ref-syntax-ddl-create-database.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ CREATE { DATABASE | SCHEMA } [ IF NOT EXISTS ] database_name

* **IF NOT EXISTS**

Creates a database with the given name if it doesn't exists. If a database with the same name already exists, nothing will happen.
Creates a database with the given name if it does not exist. If a database with the same name already exists, nothing will happen.

* **database_directory**

Expand Down
2 changes: 1 addition & 1 deletion docs/sql-ref-syntax-ddl-create-table-hiveformat.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ as any order. For example, you can write COMMENT table_comment after TBLPROPERTI

* **STORED AS**

File format for table storage, could be TEXTFILE, ORC, PARQUET,etc.
File format for table storage, could be TEXTFILE, ORC, PARQUET, etc.

* **LOCATION**

Expand Down
2 changes: 1 addition & 1 deletion docs/sql-ref-syntax-ddl-create-table-like.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ CREATE TABLE [IF NOT EXISTS] table_identifier LIKE source_table_identifier

* **STORED AS**

File format for table storage, could be TEXTFILE, ORC, PARQUET,etc.
File format for table storage, could be TEXTFILE, ORC, PARQUET, etc.

* **TBLPROPERTIES**

Expand Down
2 changes: 1 addition & 1 deletion docs/sql-ref-syntax-ddl-create-view.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ CREATE [ OR REPLACE ] [ [ GLOBAL ] TEMPORARY ] VIEW [ IF NOT EXISTS ] view_ident

* **IF NOT EXISTS**

Creates a view if it does not exists.
Creates a view if it does not exist.

* **view_identifier**

Expand Down
6 changes: 3 additions & 3 deletions docs/sql-ref-syntax-ddl-drop-table.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ DROP TABLE [ IF EXISTS ] table_identifier

* **IF EXISTS**

If specified, no exception is thrown when the table does not exists.
If specified, no exception is thrown when the table does not exist.

* **table_identifier**

Expand All @@ -53,13 +53,13 @@ DROP TABLE employeetable;
-- Assumes a table named `employeetable` exists in the `userdb` database
DROP TABLE userdb.employeetable;

-- Assumes a table named `employeetable` does not exists.
-- Assumes a table named `employeetable` does not exist.
-- Throws exception
DROP TABLE employeetable;
Error: org.apache.spark.sql.AnalysisException: Table or view not found: employeetable;
(state=,code=0)

-- Assumes a table named `employeetable` does not exists,Try with IF EXISTS
-- Assumes a table named `employeetable` does not exist,Try with IF EXISTS
-- this time it will not throw exception
DROP TABLE IF EXISTS employeetable;
```
Expand Down
6 changes: 3 additions & 3 deletions docs/sql-ref-syntax-ddl-drop-view.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ DROP VIEW [ IF EXISTS ] view_identifier

* **IF EXISTS**

If specified, no exception is thrown when the view does not exists.
If specified, no exception is thrown when the view does not exist.

* **view_identifier**

Expand All @@ -50,13 +50,13 @@ DROP VIEW employeeView;
-- Assumes a view named `employeeView` exists in the `userdb` database
DROP VIEW userdb.employeeView;

-- Assumes a view named `employeeView` does not exists.
-- Assumes a view named `employeeView` does not exist.
-- Throws exception
DROP VIEW employeeView;
Error: org.apache.spark.sql.AnalysisException: Table or view not found: employeeView;
(state=,code=0)

-- Assumes a view named `employeeView` does not exists,Try with IF EXISTS
-- Assumes a view named `employeeView` does not exist,Try with IF EXISTS
-- this time it will not throw exception
DROP VIEW IF EXISTS employeeView;
```
Expand Down