Skip to content

Commit 705f311

Browse files
committed
Docs: Supply DELETE operation case in quick start
1 parent 9d7363c commit 705f311

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed

docs/quick_start/02_play_with_spark_sql.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,4 +103,13 @@ spark-sql> select * from test_db.tbl_sql;
103103
2022-02-02 10:10:10 2 2 2
104104
2022-02-02 10:10:10 2 2 2
105105
Time taken: 0.123 seconds, Fetched 6 row(s)
106+
107+
spark-sql> delete from test_db.tbl_sql where id = 1;
108+
Time taken: 0.129 seconds
109+
110+
spark-sql> select * from test_db.tbl_sql;
111+
2022-02-02 10:10:10 2 2 2
112+
2022-02-02 10:10:10 2 2 2
113+
2022-02-02 10:10:10 2 2 2
114+
Time taken: 0.101 seconds, Fetched 3 row(s)
106115
```

docs/quick_start/03_play_with_spark_shell.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,16 @@ scala> spark.table("test_db.tbl").show
9898
|2021-01-01 10:10:10| 1| 1| 1|
9999
|2022-02-02 10:10:10| 2| 2| 2|
100100
+-------------------+---+---+-----+
101+
102+
scala> spark.sql("DELETE FROM test_db.tbl WHERE id=1")
103+
res3: org.apache.spark.sql.DataFrame = []
104+
105+
scala> spark.table("test_db.tbl").show
106+
+-------------------+---+---+-----+
107+
| create_time| m| id|value|
108+
+-------------------+---+---+-----+
109+
|2022-02-02 10:10:10| 2| 2| 2|
110+
+-------------------+---+---+-----+
101111
```
102112

103113
Execute ClickHouse native SQL.

0 commit comments

Comments
 (0)