mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 23:21:59 +00:00
updated test for hasColumnInTable
This commit is contained in:
parent
5d7afb7588
commit
3ad04a0f39
@ -1,11 +1,16 @@
|
||||
DROP TABLE IF EXISTS has_column_in_table_test;
|
||||
CREATE TABLE has_column_in_table_test (i Int64, s String, nest Nested(x UInt8, y UInt32)) ENGINE = Memory;
|
||||
CREATE DATABASE IF NOT EXISTS test;
|
||||
DROP TABLE IF EXISTS test.has_column_in_table;
|
||||
CREATE TABLE test.has_column_in_table (i Int64, s String, nest Nested(x UInt8, y UInt32)) ENGINE = Memory;
|
||||
|
||||
SELECT hasColumnInTable('default', 'has_column_in_table_test', 'i');
|
||||
SELECT hasColumnInTable('default', 'has_column_in_table_test', 's');
|
||||
SELECT hasColumnInTable('default', 'has_column_in_table_test', 'nest.x');
|
||||
SELECT hasColumnInTable('default', 'has_column_in_table_test', 'nest.y');
|
||||
/* existing column */
|
||||
SELECT hasColumnInTable('test', 'has_column_in_table', 'i');
|
||||
SELECT hasColumnInTable('test', 'has_column_in_table', 's');
|
||||
SELECT hasColumnInTable('test', 'has_column_in_table', 'nest.x');
|
||||
SELECT hasColumnInTable('test', 'has_column_in_table', 'nest.y');
|
||||
|
||||
SELECT hasColumnInTable('default', 'has_column_in_table_test', 'nest');
|
||||
SELECT hasColumnInTable('default', 'has_column_in_table_test', 'nest.not_existing');
|
||||
SELECT hasColumnInTable('default', 'has_column_in_table_test', 'not_existing');
|
||||
/* not existing column */
|
||||
SELECT hasColumnInTable('test', 'has_column_in_table', 'nest');
|
||||
SELECT hasColumnInTable('test', 'has_column_in_table', 'nest.not_existing');
|
||||
SELECT hasColumnInTable('test', 'has_column_in_table', 'not_existing');
|
||||
|
||||
DROP TABLE test.has_column_in_table;
|
||||
|
Loading…
Reference in New Issue
Block a user