mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-22 15:42:02 +00:00
S3, HDFS only for explicit creation
This commit is contained in:
parent
82bb1e8bf2
commit
58cb6c7837
@ -61,14 +61,6 @@
|
||||
# include <azure/storage/common/internal/xml_wrapper.hpp>
|
||||
#endif
|
||||
|
||||
#if USE_AWS_S3
|
||||
#include <Databases/DatabaseS3.h>
|
||||
#endif
|
||||
|
||||
#if USE_HDFS
|
||||
#include <Databases/DatabaseHDFS.h>
|
||||
#endif
|
||||
|
||||
namespace fs = std::filesystem;
|
||||
|
||||
|
||||
@ -165,12 +157,6 @@ static DatabasePtr createClickHouseLocalDatabaseOverlay(const String & name_, Co
|
||||
auto databaseCombiner = std::make_shared<DatabasesOverlay>(name_, context_);
|
||||
databaseCombiner->registerNextDatabase(std::make_shared<DatabaseFilesystem>(name_, "", context_));
|
||||
databaseCombiner->registerNextDatabase(std::make_shared<DatabaseMemory>(name_, context_));
|
||||
#if USE_AWS_S3
|
||||
databaseCombiner->registerNextDatabase(std::make_shared<DatabaseS3>(name_, "", "", context_));
|
||||
#endif
|
||||
#if USE_HDFS
|
||||
databaseCombiner->registerNextDatabase(std::make_shared<DatabaseHDFS>(name_, "", context_));
|
||||
#endif
|
||||
return databaseCombiner;
|
||||
}
|
||||
|
||||
|
@ -8,11 +8,6 @@ test1
|
||||
13 14 15
|
||||
16 17 18
|
||||
0 0 0
|
||||
10 11 12
|
||||
13 14 15
|
||||
16 17 18
|
||||
0 0 0
|
||||
Test 2: check exceptions
|
||||
OK
|
||||
OK
|
||||
OK
|
||||
|
@ -25,12 +25,8 @@ SELECT * FROM \"http://localhost:11111/test/b.tsv\"
|
||||
"""
|
||||
${CLICKHOUSE_CLIENT} -q "DROP DATABASE test2;"
|
||||
|
||||
${CLICKHOUSE_LOCAL} --query "SELECT * FROM \"http://localhost:11111/test/b.tsv\""
|
||||
|
||||
#################
|
||||
echo "Test 2: check exceptions"
|
||||
${CLICKHOUSE_LOCAL} --query "SELECT * FROM \"http://localhost:11111/test/c.myext\"" 2>&1| grep -F "UNKNOWN_TABLE" > /dev/null && echo "OK"
|
||||
|
||||
${CLICKHOUSE_CLIENT} --multiline --multiquery -q """
|
||||
DROP DATABASE IF EXISTS test3;
|
||||
CREATE DATABASE test3 ENGINE = S3;
|
||||
|
@ -3,7 +3,6 @@ Test 1: select from hdfs database
|
||||
test1
|
||||
1 2 3
|
||||
test2
|
||||
4 5 6
|
||||
Test 2: check exceptions
|
||||
OK0
|
||||
OK1
|
||||
@ -11,6 +10,3 @@ OK2
|
||||
OK3
|
||||
OK4
|
||||
OK5
|
||||
OK6
|
||||
OK7
|
||||
OK8
|
||||
|
@ -30,31 +30,25 @@ SELECT * FROM \"test_02725_1.tsv\"
|
||||
"""
|
||||
${CLICKHOUSE_CLIENT} -q "SHOW DATABASES;" | grep test2
|
||||
|
||||
# Check implicit call in clickhouse-local
|
||||
${CLICKHOUSE_LOCAL} --query "SELECT * FROM \"hdfs://localhost:12222/test_02725_2.tsv\""
|
||||
|
||||
#################
|
||||
echo "Test 2: check exceptions"
|
||||
${CLICKHOUSE_LOCAL} --query "SELECT * FROM \"hdfs://localhost:12222/file.myext\"" 2>&1| grep -F "UNKNOWN_TABLE" > /dev/null && echo "OK0"
|
||||
${CLICKHOUSE_LOCAL} --query "SELECT * FROM \"hdfs://localhost:12222/test_02725_3.tsv\"" 2>&1| grep -F "UNKNOWN_TABLE" > /dev/null && echo "OK1"
|
||||
${CLICKHOUSE_LOCAL} --query "SELECT * FROM \"hdfs://localhost:12222\"" 2>&1| grep -F "UNKNOWN_TABLE" > /dev/null && echo "OK2"
|
||||
|
||||
${CLICKHOUSE_CLIENT} --multiline --multiquery -q """
|
||||
DROP DATABASE IF EXISTS test3;
|
||||
CREATE DATABASE test3 ENGINE = HDFS('abacaba');
|
||||
""" 2>&1| grep -F "BAD_ARGUMENTS" > /dev/null && echo "OK3"
|
||||
""" 2>&1| grep -F "BAD_ARGUMENTS" > /dev/null && echo "OK0"
|
||||
|
||||
${CLICKHOUSE_CLIENT} --multiline --multiquery -q """
|
||||
DROP DATABASE IF EXISTS test4;
|
||||
CREATE DATABASE test4 ENGINE = HDFS;
|
||||
USE test4;
|
||||
SELECT * FROM \"abacaba/file.tsv\"
|
||||
""" 2>&1| grep -F "BAD_ARGUMENTS" > /dev/null && echo "OK4"
|
||||
""" 2>&1| grep -F "BAD_ARGUMENTS" > /dev/null && echo "OK1"
|
||||
|
||||
${CLICKHOUSE_CLIENT} -q "SELECT * FROM test4.\`http://localhost:11111/test/a.tsv\`" 2>&1| grep -F "BAD_ARGUMENTS" > /dev/null && echo "OK5"
|
||||
${CLICKHOUSE_CLIENT} --query "SELECT * FROM test4.\`hdfs://localhost:12222/file.myext\`" 2>&1| grep -F "BAD_ARGUMENTS" > /dev/null && echo "OK6"
|
||||
${CLICKHOUSE_CLIENT} --query "SELECT * FROM test4.\`hdfs://localhost:12222/test_02725_3.tsv\`" 2>&1| grep -F "CANNOT_EXTRACT_TABLE_STRUCTURE" > /dev/null && echo "OK7"
|
||||
${CLICKHOUSE_CLIENT} --query "SELECT * FROM test4.\`hdfs://localhost:12222\`" 2>&1| grep -F "BAD_ARGUMENTS" > /dev/null && echo "OK8"
|
||||
${CLICKHOUSE_CLIENT} -q "SELECT * FROM test4.\`http://localhost:11111/test/a.tsv\`" 2>&1| grep -F "BAD_ARGUMENTS" > /dev/null && echo "OK2"
|
||||
${CLICKHOUSE_CLIENT} --query "SELECT * FROM test4.\`hdfs://localhost:12222/file.myext\`" 2>&1| grep -F "BAD_ARGUMENTS" > /dev/null && echo "OK3"
|
||||
${CLICKHOUSE_CLIENT} --query "SELECT * FROM test4.\`hdfs://localhost:12222/test_02725_3.tsv\`" 2>&1| grep -F "CANNOT_EXTRACT_TABLE_STRUCTURE" > /dev/null && echo "OK4"
|
||||
${CLICKHOUSE_CLIENT} --query "SELECT * FROM test4.\`hdfs://localhost:12222\`" 2>&1| grep -F "BAD_ARGUMENTS" > /dev/null && echo "OK5"
|
||||
|
||||
|
||||
# Cleanup
|
||||
|
Loading…
Reference in New Issue
Block a user