Skip to content

Commit

Permalink
Minor after review
Browse files Browse the repository at this point in the history
  • Loading branch information
AMashenkov committed May 13, 2024
1 parent 405c7c1 commit d22485e
Showing 1 changed file with 49 additions and 31 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,43 +15,53 @@ CREATE TABLE t (id INTEGER, val INTEGER, PRIMARY KEY (id))
statement ok
CREATE TABLE tableName_veryLoooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooongIdentifierOf128Characters (keyColumnName_veryLoooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooongIdentifierOf128Characters INTEGER, valueColumnName_veryLoooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooongIdentifierOf128Characters INTEGER, PRIMARY KEY (keyColumnName_veryLoooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooongIdentifierOf128Characters));

statement error
statement error: length of identifier is too long
CREATE TABLE tableName_veryLooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooongIdentifierOf129Characters (key INTEGER, val INTEGER, PRIMARY KEY (key));


# Rename table with long identifiers
# TODO: Enable after https://issues.apache.org/jira/browse/IGNITE-19484 is fixed.
# statement error
# ALTER TABLE t RENAME TO tableName_veryLooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooongIdentifierOf129Characters;
# TODO: Enable after https://issues.apache.org/jira/browse/IGNITE-19484 is fixed.
# statement ok
# ALTER TABLE t RENAME TO tableName_veryLoooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooongIdentifierOf128Characters;
# TODO: Enable after https://issues.apache.org/jira/browse/IGNITE-19484 is fixed.
# statement ok
# ALTER TABLE tableName_veryLoooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooongIdentifierOf128Characters RENAME TO tableName;
skipif ignite3
# Ignored: https://issues.apache.org/jira/browse/IGNITE-19484
statement error: length of identifier is too long
ALTER TABLE t RENAME TO tableName_veryLooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooongIdentifierOf129Characters;

skipif ignite3
# Ignored: https://issues.apache.org/jira/browse/IGNITE-19484
statement ok
ALTER TABLE t RENAME TO tableName_veryLoooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooongIdentifierOf128Characters;

skipif ignite3
# Ignored: https://issues.apache.org/jira/browse/IGNITE-19484
statement ok
ALTER TABLE tableName_veryLoooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooongIdentifierOf128Characters RENAME TO tableName;


# Alter table add/drop column with long identifier
statement ok
ALTER TABLE t ADD COLUMN (columnName_veryLooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooongIdentifierOf128Characters INTEGER);

statement error
statement error: length of identifier is too long
ALTER TABLE t ADD COLUMN (columnName_veryLoooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooongIdentifierOf129Characters INTEGER);

statement ok
ALTER TABLE t DROP COLUMN (columnName_veryLooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooongIdentifierOf128Characters);


# Alter table rename column with long identifier
# TODO: IGNITE-19485, IGNITE-20315 - Uncomment this after column rename support gets aded.
# statement error
# ALTER TABLE t RENAME COLUMN val TO columnName_veryLoooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooongIdentifierOf129Characters;
# TODO: IGNITE-19485, IGNITE-20315 - Uncomment this after column rename support gets aded.
# statement ok
# ALTER TABLE t RENAME COLUMN val TO columnName_veryLooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooongIdentifierOf128Characters;
# TODO: IGNITE-19485, IGNITE-20315 - Uncomment this after column rename support gets aded.
# statement ok
# ALTER TABLE t RENAME COLUMN columnName_veryLooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooongIdentifierOf128Characters TO val;
skipif ignite3
# Ignored: https://issues.apache.org/jira/browse/IGNITE-19485
statement error: length of identifier is too long
ALTER TABLE t RENAME COLUMN val TO columnName_veryLoooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooongIdentifierOf129Characters;

skipif ignite3
# Ignored: https://issues.apache.org/jira/browse/IGNITE-19485
statement ok
ALTER TABLE t RENAME COLUMN val TO columnName_veryLooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooongIdentifierOf128Characters;

skipif ignite3
# Ignored: https://issues.apache.org/jira/browse/IGNITE-19485
statement ok
ALTER TABLE t RENAME COLUMN columnName_veryLooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooongIdentifierOf128Characters TO val;


# Alter table with long identifier
Expand All @@ -76,10 +86,10 @@ SELECT columnAlias_veryLoooooooooooooooooooooooooooooooooooooooooooooooooooooooo
1
2

statement error
statement error: length of identifier is too long
SELECT columnAlias_veryLooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooongIdentifierOf129Characters FROM (VALUES (1), (2)) t(columnAlias_veryLooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooongIdentifierOf129Characters);

statement error
statement error: length of identifier is too long
SELECT col FROM (VALUES (1), (2)) tableAlias_veryLoooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooongIdentifierOf129Characters(col);

query I
Expand All @@ -92,10 +102,10 @@ SELECT 1 columnAlias_veryLoooooooooooooooooooooooooooooooooooooooooooooooooooooo
----
1

statement error
statement error: length of identifier is too long
SELECT 1 as columnAlias_veryLooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooongIdentifierOf129Characters

statement error
statement error: length of identifier is too long
SELECT 1 columnAlias_veryLooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooongIdentifierOf129Characters

# Long column aliases with subquery
Expand All @@ -109,10 +119,10 @@ SELECT columnAlias_veryLoooooooooooooooooooooooooooooooooooooooooooooooooooooooo
----
1

statement error
statement error: length of identifier is too long
SELECT columnAlias_veryLooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooongIdentifierOf129Characters FROM (SELECT 1 as columnAlias_veryLooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooongIdentifierOf129Characters);

statement error
statement error: length of identifier is too long
SELECT columnAlias_veryLoooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooongIdentifierOf129Characters FROM (SELECT 1 columnAlias_veryLooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooongIdentifierOf129Characters);

query I
Expand All @@ -122,6 +132,14 @@ SELECT tableName_veryLoooooooooooooooooooooooooooooooooooooooooooooooooooooooooo
2

# Long table alias
query I
SELECT * FROM (SELECT 1) as tableAlias_veryLooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooongIdentifierOf128Characters;
----
1

statement error: length of identifier is too long
SELECT * FROM (SELECT 1) as tableAlias_veryLoooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooongIdentifierOf129Characters;

query I
SELECT tableAlias_veryLooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooongIdentifierOf128Characters.id FROM t as tableAlias_veryLooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooongIdentifierOf128Characters;
----
Expand All @@ -141,7 +159,7 @@ SELECT id as columnAlias_veryLoooooooooooooooooooooooooooooooooooooooooooooooooo
2
1

statement error
statement error: length of identifier is too long
SELECT id as columnAlias_veryLooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooongIdentifierOf129Characters FROM t ORDER BY columnAlias_veryLooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooongIdentifierOf129Characters DESC;


Expand All @@ -156,7 +174,7 @@ SELECT val as columnAlias_veryLooooooooooooooooooooooooooooooooooooooooooooooooo
----
1 3

statement error
statement error: length of identifier is too long
SELECT id as columnAlias_veryLooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooongIdentifierOf129Characters FROM t GROUP BY columnAlias_veryLooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooongIdentifierOf129Characters;


Expand All @@ -174,7 +192,7 @@ CREATE INDEX indexName_veryLoooooooooooooooooooooooooooooooooooooooooooooooooooo
statement ok
DROP INDEX indexName_veryLoooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooongIdentifierOf128Characters;

statement error
statement error: length of identifier is too long
CREATE INDEX indexName_veryLooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooongIdentifierOf129Characters on t (val);


Expand All @@ -190,7 +208,7 @@ DROP TABLE tableName_veryLoooooooooooooooooooooooooooooooooooooooooooooooooooooo
statement ok
CREATE ZONE zoneName_veryLooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooongIdentifierOf128Characters WITH STORAGE_PROFILES='default', PARTITIONS=1, REPLICAS=3;

statement error
statement error: length of identifier is too long
CREATE ZONE zoneName_veryLoooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooongIdentifierOf129Characters WITH STORAGE_PROFILES='default', PARTITIONS=1, REPLICAS=3;

statement ok
Expand All @@ -199,7 +217,7 @@ ALTER ZONE zoneName_veryLooooooooooooooooooooooooooooooooooooooooooooooooooooooo
statement ok
ALTER ZONE zoneName_veryLooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooongIdentifierOf128Characters RENAME TO zoneName;

statement error
statement error: length of identifier is too long
ALTER ZONE zoneName RENAME TO zoneName_veryLoooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooongIdentifierOf129Characters;

statement ok
Expand Down

0 comments on commit d22485e

Please sign in to comment.