forked from ydb-platform/ydb
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
YQL-16026: Remove PG tests char.sql and varchar.sql from ignored (ydb…
…-platform#1178) * Added char and varchar to the tests that are built * Added tests & results for char & varchar * Updated .err files * Updated regression tests' status
- Loading branch information
Showing
17 changed files
with
860 additions
and
177 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,101 @@ | ||
<sql-statement> | ||
-- | ||
-- CHAR | ||
-- | ||
-- fixed-length by value | ||
-- internally passed by value if <= 4 bytes in storage | ||
SELECT char 'c' = char 'c' AS true; | ||
</sql-statement> | ||
<sql-statement> | ||
-- | ||
-- Build a table for testing | ||
-- | ||
CREATE TABLE CHAR_TBL(f1 char); | ||
</sql-statement> | ||
<sql-statement> | ||
INSERT INTO CHAR_TBL (f1) VALUES ('a'); | ||
</sql-statement> | ||
<sql-statement> | ||
INSERT INTO CHAR_TBL (f1) VALUES ('A'); | ||
</sql-statement> | ||
<sql-statement> | ||
-- any of the following three input formats are acceptable | ||
INSERT INTO CHAR_TBL (f1) VALUES ('1'); | ||
</sql-statement> | ||
<sql-statement> | ||
INSERT INTO CHAR_TBL (f1) VALUES (2); | ||
</sql-statement> | ||
<sql-statement> | ||
INSERT INTO CHAR_TBL (f1) VALUES ('3'); | ||
</sql-statement> | ||
<sql-statement> | ||
-- zero-length char | ||
INSERT INTO CHAR_TBL (f1) VALUES (''); | ||
</sql-statement> | ||
<sql-statement> | ||
-- try char's of greater than 1 length | ||
INSERT INTO CHAR_TBL (f1) VALUES ('cd'); | ||
</sql-statement> | ||
<sql-statement> | ||
INSERT INTO CHAR_TBL (f1) VALUES ('c '); | ||
</sql-statement> | ||
<sql-statement> | ||
SELECT * FROM CHAR_TBL; | ||
</sql-statement> | ||
<sql-statement> | ||
SELECT c.* | ||
FROM CHAR_TBL c | ||
WHERE c.f1 <> 'a'; | ||
</sql-statement> | ||
<sql-statement> | ||
SELECT c.* | ||
FROM CHAR_TBL c | ||
WHERE c.f1 = 'a'; | ||
</sql-statement> | ||
<sql-statement> | ||
SELECT c.* | ||
FROM CHAR_TBL c | ||
WHERE c.f1 < 'a'; | ||
</sql-statement> | ||
<sql-statement> | ||
SELECT c.* | ||
FROM CHAR_TBL c | ||
WHERE c.f1 <= 'a'; | ||
</sql-statement> | ||
<sql-statement> | ||
SELECT c.* | ||
FROM CHAR_TBL c | ||
WHERE c.f1 > 'a'; | ||
</sql-statement> | ||
<sql-statement> | ||
SELECT c.* | ||
FROM CHAR_TBL c | ||
WHERE c.f1 >= 'a'; | ||
</sql-statement> | ||
<sql-statement> | ||
DROP TABLE CHAR_TBL; | ||
</sql-statement> | ||
<sql-statement> | ||
-- | ||
-- Now test longer arrays of char | ||
-- | ||
CREATE TABLE CHAR_TBL(f1 char(4)); | ||
</sql-statement> | ||
<sql-statement> | ||
INSERT INTO CHAR_TBL (f1) VALUES ('a'); | ||
</sql-statement> | ||
<sql-statement> | ||
INSERT INTO CHAR_TBL (f1) VALUES ('ab'); | ||
</sql-statement> | ||
<sql-statement> | ||
INSERT INTO CHAR_TBL (f1) VALUES ('abcd'); | ||
</sql-statement> | ||
<sql-statement> | ||
INSERT INTO CHAR_TBL (f1) VALUES ('abcde'); | ||
</sql-statement> | ||
<sql-statement> | ||
INSERT INTO CHAR_TBL (f1) VALUES ('abcd '); | ||
</sql-statement> | ||
<sql-statement> | ||
SELECT * FROM CHAR_TBL; | ||
</sql-statement> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,101 @@ | ||
<sql-statement> | ||
-- | ||
-- CHAR | ||
-- | ||
-- fixed-length by value | ||
-- internally passed by value if <= 4 bytes in storage | ||
SELECT char 'c' = char 'c' AS true; | ||
</sql-statement> | ||
<sql-statement> | ||
-- | ||
-- Build a table for testing | ||
-- | ||
CREATE TABLE CHAR_TBL(f1 char); | ||
</sql-statement> | ||
<sql-statement> | ||
INSERT INTO CHAR_TBL (f1) VALUES ('a'); | ||
</sql-statement> | ||
<sql-statement> | ||
INSERT INTO CHAR_TBL (f1) VALUES ('A'); | ||
</sql-statement> | ||
<sql-statement> | ||
-- any of the following three input formats are acceptable | ||
INSERT INTO CHAR_TBL (f1) VALUES ('1'); | ||
</sql-statement> | ||
<sql-statement> | ||
INSERT INTO CHAR_TBL (f1) VALUES (2); | ||
</sql-statement> | ||
<sql-statement> | ||
INSERT INTO CHAR_TBL (f1) VALUES ('3'); | ||
</sql-statement> | ||
<sql-statement> | ||
-- zero-length char | ||
INSERT INTO CHAR_TBL (f1) VALUES (''); | ||
</sql-statement> | ||
<sql-statement> | ||
-- try char's of greater than 1 length | ||
INSERT INTO CHAR_TBL (f1) VALUES ('cd'); | ||
</sql-statement> | ||
<sql-statement> | ||
INSERT INTO CHAR_TBL (f1) VALUES ('c '); | ||
</sql-statement> | ||
<sql-statement> | ||
SELECT * FROM CHAR_TBL; | ||
</sql-statement> | ||
<sql-statement> | ||
SELECT c.* | ||
FROM CHAR_TBL c | ||
WHERE c.f1 <> 'a'; | ||
</sql-statement> | ||
<sql-statement> | ||
SELECT c.* | ||
FROM CHAR_TBL c | ||
WHERE c.f1 = 'a'; | ||
</sql-statement> | ||
<sql-statement> | ||
SELECT c.* | ||
FROM CHAR_TBL c | ||
WHERE c.f1 < 'a'; | ||
</sql-statement> | ||
<sql-statement> | ||
SELECT c.* | ||
FROM CHAR_TBL c | ||
WHERE c.f1 <= 'a'; | ||
</sql-statement> | ||
<sql-statement> | ||
SELECT c.* | ||
FROM CHAR_TBL c | ||
WHERE c.f1 > 'a'; | ||
</sql-statement> | ||
<sql-statement> | ||
SELECT c.* | ||
FROM CHAR_TBL c | ||
WHERE c.f1 >= 'a'; | ||
</sql-statement> | ||
<sql-statement> | ||
DROP TABLE CHAR_TBL; | ||
</sql-statement> | ||
<sql-statement> | ||
-- | ||
-- Now test longer arrays of char | ||
-- | ||
CREATE TABLE CHAR_TBL(f1 char(4)); | ||
</sql-statement> | ||
<sql-statement> | ||
INSERT INTO CHAR_TBL (f1) VALUES ('a'); | ||
</sql-statement> | ||
<sql-statement> | ||
INSERT INTO CHAR_TBL (f1) VALUES ('ab'); | ||
</sql-statement> | ||
<sql-statement> | ||
INSERT INTO CHAR_TBL (f1) VALUES ('abcd'); | ||
</sql-statement> | ||
<sql-statement> | ||
INSERT INTO CHAR_TBL (f1) VALUES ('abcde'); | ||
</sql-statement> | ||
<sql-statement> | ||
INSERT INTO CHAR_TBL (f1) VALUES ('abcd '); | ||
</sql-statement> | ||
<sql-statement> | ||
SELECT * FROM CHAR_TBL; | ||
</sql-statement> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,101 @@ | ||
<sql-statement> | ||
-- | ||
-- CHAR | ||
-- | ||
-- fixed-length by value | ||
-- internally passed by value if <= 4 bytes in storage | ||
SELECT char 'c' = char 'c' AS true; | ||
</sql-statement> | ||
<sql-statement> | ||
-- | ||
-- Build a table for testing | ||
-- | ||
CREATE TABLE CHAR_TBL(f1 char); | ||
</sql-statement> | ||
<sql-statement> | ||
INSERT INTO CHAR_TBL (f1) VALUES ('a'); | ||
</sql-statement> | ||
<sql-statement> | ||
INSERT INTO CHAR_TBL (f1) VALUES ('A'); | ||
</sql-statement> | ||
<sql-statement> | ||
-- any of the following three input formats are acceptable | ||
INSERT INTO CHAR_TBL (f1) VALUES ('1'); | ||
</sql-statement> | ||
<sql-statement> | ||
INSERT INTO CHAR_TBL (f1) VALUES (2); | ||
</sql-statement> | ||
<sql-statement> | ||
INSERT INTO CHAR_TBL (f1) VALUES ('3'); | ||
</sql-statement> | ||
<sql-statement> | ||
-- zero-length char | ||
INSERT INTO CHAR_TBL (f1) VALUES (''); | ||
</sql-statement> | ||
<sql-statement> | ||
-- try char's of greater than 1 length | ||
INSERT INTO CHAR_TBL (f1) VALUES ('cd'); | ||
</sql-statement> | ||
<sql-statement> | ||
INSERT INTO CHAR_TBL (f1) VALUES ('c '); | ||
</sql-statement> | ||
<sql-statement> | ||
SELECT * FROM CHAR_TBL; | ||
</sql-statement> | ||
<sql-statement> | ||
SELECT c.* | ||
FROM CHAR_TBL c | ||
WHERE c.f1 <> 'a'; | ||
</sql-statement> | ||
<sql-statement> | ||
SELECT c.* | ||
FROM CHAR_TBL c | ||
WHERE c.f1 = 'a'; | ||
</sql-statement> | ||
<sql-statement> | ||
SELECT c.* | ||
FROM CHAR_TBL c | ||
WHERE c.f1 < 'a'; | ||
</sql-statement> | ||
<sql-statement> | ||
SELECT c.* | ||
FROM CHAR_TBL c | ||
WHERE c.f1 <= 'a'; | ||
</sql-statement> | ||
<sql-statement> | ||
SELECT c.* | ||
FROM CHAR_TBL c | ||
WHERE c.f1 > 'a'; | ||
</sql-statement> | ||
<sql-statement> | ||
SELECT c.* | ||
FROM CHAR_TBL c | ||
WHERE c.f1 >= 'a'; | ||
</sql-statement> | ||
<sql-statement> | ||
DROP TABLE CHAR_TBL; | ||
</sql-statement> | ||
<sql-statement> | ||
-- | ||
-- Now test longer arrays of char | ||
-- | ||
CREATE TABLE CHAR_TBL(f1 char(4)); | ||
</sql-statement> | ||
<sql-statement> | ||
INSERT INTO CHAR_TBL (f1) VALUES ('a'); | ||
</sql-statement> | ||
<sql-statement> | ||
INSERT INTO CHAR_TBL (f1) VALUES ('ab'); | ||
</sql-statement> | ||
<sql-statement> | ||
INSERT INTO CHAR_TBL (f1) VALUES ('abcd'); | ||
</sql-statement> | ||
<sql-statement> | ||
INSERT INTO CHAR_TBL (f1) VALUES ('abcde'); | ||
</sql-statement> | ||
<sql-statement> | ||
INSERT INTO CHAR_TBL (f1) VALUES ('abcd '); | ||
</sql-statement> | ||
<sql-statement> | ||
SELECT * FROM CHAR_TBL; | ||
</sql-statement> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,31 @@ | ||
-- | ||
-- CHAR | ||
-- | ||
|
||
-- fixed-length by value | ||
-- internally passed by value if <= 4 bytes in storage | ||
|
||
SELECT char 'c' = char 'c' AS true; | ||
|
||
-- | ||
-- Build a table for testing | ||
-- | ||
|
||
CREATE TABLE CHAR_TBL(f1 char); | ||
INSERT INTO CHAR_TBL (f1) VALUES ('a'); | ||
INSERT INTO CHAR_TBL (f1) VALUES ('A'); | ||
-- any of the following three input formats are acceptable | ||
INSERT INTO CHAR_TBL (f1) VALUES ('1'); | ||
INSERT INTO CHAR_TBL (f1) VALUES (2); | ||
INSERT INTO CHAR_TBL (f1) VALUES ('3'); | ||
-- zero-length char | ||
INSERT INTO CHAR_TBL (f1) VALUES (''); | ||
INSERT INTO CHAR_TBL (f1) VALUES ('c '); | ||
SELECT c.* | ||
FROM CHAR_TBL c | ||
WHERE c.f1 = 'a'; | ||
DROP TABLE CHAR_TBL; | ||
-- | ||
-- Now test longer arrays of char | ||
-- | ||
CREATE TABLE CHAR_TBL(f1 char(4)); | ||
INSERT INTO CHAR_TBL (f1) VALUES ('a'); | ||
INSERT INTO CHAR_TBL (f1) VALUES ('ab'); | ||
INSERT INTO CHAR_TBL (f1) VALUES ('abcd'); | ||
INSERT INTO CHAR_TBL (f1) VALUES ('abcd '); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.