First portion

This commit is contained in:
Nikita Mikhaylov 2024-04-02 15:47:48 +00:00
parent dab71c93b7
commit ed9ee5ab4c
8 changed files with 105 additions and 0 deletions

View File

@ -0,0 +1,27 @@
-- https://github.com/ClickHouse/ClickHouse/issues/55794
DROP TABLE IF EXISTS 03033_example_table;
CREATE TABLE 03033_example_table
(
ColumnA Int64,
ColumnB Int64,
ColumnC Int64
)
ENGINE = MergeTree()
ORDER BY ColumnA;
WITH
helper AS (
SELECT
*
FROM
03033_example_table
ORDER BY
ColumnA WITH FILL INTERPOLATE (
ColumnB AS ColumnC,
ColumnC AS ColumnA
)
)
SELECT ColumnB FROM helper;
DROP TABLE IF EXISTS 03033_example_table;

View File

@ -0,0 +1,7 @@
-- https://github.com/ClickHouse/ClickHouse/issues/49472
SELECT
concat(database, table) AS name,
count()
FROM clusterAllReplicas(default, system.tables)
GROUP BY name
FORMAT Null;

View File

@ -0,0 +1,43 @@
-- https://github.com/ClickHouse/ClickHouse/issues/44414
DROP TABLE IF EXISTS alias_bug;
DROP TABLE IF EXISTS alias_bug_dist;
CREATE TABLE alias_bug
(
`src` String,
`theAlias` String ALIAS trimBoth(src)
)
ENGINE = MergeTree()
ORDER BY src;
CREATE TABLE alias_bug_dist
AS alias_bug
ENGINE = Distributed('default', currentDatabase(), 'alias_bug', rand());
INSERT INTO alias_bug VALUES ('SOURCE1');
-- OK
SELECT theAlias,CAST(NULL, 'Nullable(String)') AS src FROM alias_bug LIMIT 1 FORMAT Null;
-- Not OK
SELECT theAlias,CAST(NULL, 'Nullable(String)') AS src FROM alias_bug_dist LIMIT 1 FORMAT Null;
DROP TABLE IF EXISTS alias_bug;
DROP TABLE IF EXISTS alias_bug_dist;
CREATE TABLE alias_bug
(
`s` String,
`src` String,
`theAlias` String ALIAS trimBoth(src)
)
ENGINE = MergeTree()
ORDER BY src;
CREATE TABLE alias_bug_dist
AS alias_bug
ENGINE = Distributed('default', currentDatabase(), 'alias_bug', rand());
-- Unknown identifier
SELECT CAST(123, 'String') AS src,theAlias FROM alias_bug_dist LIMIT 1 FORMAT Null;
DROP TABLE IF EXISTS alias_bug;
DROP TABLE IF EXISTS alias_bug_dist;

View File

@ -0,0 +1,20 @@
0
1
2
3
4
5
6
7
8
9
0
1
2
3
4
5
6
7
8
9

View File

@ -0,0 +1,8 @@
-- https://github.com/ClickHouse/ClickHouse/issues/13843
WITH 10 AS n
SELECT *
FROM numbers(n);
WITH cast(10, 'UInt64') AS n
SELECT *
FROM numbers(n);