-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: external table for cassandra (#2361)
closes #2345
- Loading branch information
1 parent
f12fb20
commit 0b4b1fc
Showing
12 changed files
with
159 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# Basic tests for external tables. | ||
|
||
statement ok | ||
CREATE EXTERNAL TABLE basic | ||
FROM cassandra | ||
OPTIONS ( | ||
host = '${CASSANDRA_CONN_STRING}', | ||
keyspace = 'test', | ||
table = 'bikeshare_stations' | ||
); | ||
|
||
include ${PWD}/testdata/sqllogictests_datasources_common/include/basic.slti |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# Basic tests for external tables. | ||
|
||
statement ok | ||
CREATE EXTERNAL TABLE external_table | ||
FROM cassandra | ||
OPTIONS ( | ||
host = '127.0.0.1:9042', | ||
keyspace = 'test', | ||
table = 'bikeshare_stations', | ||
); | ||
|
||
query I | ||
SELECT count(*) FROM external_table; | ||
---- | ||
102 | ||
|
||
statement ok | ||
DROP TABLE external_table; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# Validation tests for clickhouse external database and external tables | ||
|
||
# External database validation | ||
|
||
statement error | ||
CREATE EXTERNAL DATABASE wrong_host | ||
FROM cassandra | ||
OPTIONS ( | ||
host = '127.0.0.1:9876', | ||
); | ||
|
||
# Validation test error with the wrong table name | ||
statement error | ||
CREATE EXTERNAL TABLE missing_table | ||
FROM cassandra | ||
OPTIONS ( | ||
host = '${CASSANDRA_CONN_STRING}', | ||
keyspace = 'test', | ||
table = 'missing_table' | ||
); | ||
|