Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@ DB.Table: 'system'.'columns', Table: columns-table_id:1, ver:0, Engine: SystemCo
| "name" | "system" | "tables_with_history" | "String" | "VARCHAR" | "" | "" | "NO" | "" |
| "name" | "system" | "users" | "String" | "VARCHAR" | "" | "" | "NO" | "" |
| "non_unique" | "information_schema" | "statistics" | "NULL" | "NULL" | "" | "" | "NO" | "" |
| "nullable" | "information_schema" | "columns" | "Nullable(UInt8)" | "TINYINT UNSIGNED" | "" | "" | "YES" | "" |
| "nullable" | "information_schema" | "statistics" | "NULL" | "NULL" | "" | "" | "NO" | "" |
| "num_rows" | "system" | "query_cache" | "UInt64" | "BIGINT UNSIGNED" | "" | "" | "NO" | "" |
| "num_rows" | "system" | "tables" | "Nullable(UInt64)" | "BIGINT UNSIGNED" | "" | "" | "YES" | "" |
Expand Down
3 changes: 3 additions & 0 deletions src/query/storages/information-schema/src/columns_table.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ impl ColumnsTable {
NULL AS column_default,
NULL AS column_comment,
NULL AS column_key,
case when is_nullable='NO' then 0
when is_nullable='YES' then 1
end as nullable,
is_nullable AS is_nullable,
data_type AS data_type,
data_type AS column_type,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ ordinal_position TINYINT UNSIGNED NO 0 (empty)
column_default NULL NO NULL (empty)
column_comment NULL NO NULL (empty)
column_key NULL NO NULL (empty)
nullable TINYINT UNSIGNED YES NULL (empty)
is_nullable VARCHAR NO "" (empty)
data_type VARCHAR NO "" (empty)
column_type VARCHAR NO "" (empty)
Expand All @@ -82,6 +83,12 @@ domain_schema NULL NO NULL (empty)
domain_name NULL NO NULL (empty)
extra NULL NO NULL (empty)

query TTT
select column_name, nullable, is_nullable from INFORMATION_SCHEMA.COLUMNS where table_name='tables_with_history' and column_name in ('num_rows', 'dropped_on') order by column_name
----
dropped_on 0 NO
num_rows 1 YES

statement ok
DROP TABLE IF EXISTS t

Expand Down