ygerzhedovich commented on a change in pull request #9194:
URL: https://github.com/apache/ignite/pull/9194#discussion_r665323969
##########
File path: modules/calcite/src/test/sql/function/string/test_trim.test
##########
@@ -25,100 +22,73 @@ select TRIM(''), TRIM('Neither'), TRIM(' Leading'),
TRIM('Trailing '), TRIM('
# test on tables
statement ok
-CREATE TABLE strings(a STRING, b STRING)
+CREATE TABLE strings(id INTEGER, a VARCHAR, b VARCHAR)
statement ok
-INSERT INTO strings VALUES ('', 'Neither'), (' Leading', NULL), (' Both
','Trailing '), ('', NULL)
+INSERT INTO strings VALUES (0, '', 'Neither'), (1, ' Leading', NULL), (2, '
Both ','Trailing '), (3, '', NULL)
query T
-select LTRIM(a) FROM strings
+select LTRIM(a) FROM strings ORDER BY id
----
(empty)
Leading
Both
(empty)
query T
-select LTRIM(b) FROM strings
+select LTRIM(b) FROM strings ORDER BY id
----
Neither
NULL
Trailing
NULL
query T
-select LTRIM(a) FROM strings WHERE b IS NOT NULL
+select LTRIM(a) FROM strings WHERE b IS NOT NULL ORDER BY id
----
(empty)
Both
# test rtrim on tables
query T
-select RTRIM(a) FROM strings
+select RTRIM(a) FROM strings ORDER BY id
----
(empty)
Leading
Both
(empty)
query T
-select RTRIM(b) FROM strings
+select RTRIM(b) FROM strings ORDER BY id
----
Neither
NULL
Trailing
NULL
query T
-select RTRIM(a) FROM strings WHERE b IS NOT NULL
+select RTRIM(a) FROM strings WHERE b IS NOT NULL ORDER BY id
----
(empty)
Both
-# test ltrim/rtrim/trim with custom trim filter
-query TTTTTTT
-select LTRIM('', 'ho'), LTRIM('hello', 'ho'), LTRIM('papapapa', 'pa'),
LTRIM('blaHblabla', 'bla'), LTRIM('blabla', NULL), LTRIM(NULL, 'blabla'),
LTRIM('blabla', '')
-----
-(empty) ello (empty) Hblabla NULL NULL blabla
-
-query TTTTTTT
-select RTRIM('', 'ho'), RTRIM('hello', 'ho'), RTRIM('papapapa', 'pa'),
RTRIM('blaHblabla', 'bla'), RTRIM('blabla', NULL), RTRIM(NULL, 'blabla'),
RTRIM('blabla', '')
-----
-(empty) hell (empty) blaH NULL NULL blabla
-
-query TTTTTTT
-select TRIM('', 'ho'), TRIM('hello', 'ho'), TRIM('papapapa', 'pa'),
TRIM('blaHblabla', 'bla'), TRIM('blabla', NULL), TRIM(NULL, 'blabla'),
TRIM('blabla', '')
Review comment:
why you remove the test?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]