You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ignite.apache.org by GitBox <gi...@apache.org> on 2021/06/24 09:16:54 UTC

[GitHub] [ignite] tledkov-gridgain opened a new pull request #9194: IGNITE-14953 Calcite. Sort out test scripts 'function'

tledkov-gridgain opened a new pull request #9194:
URL: https://github.com/apache/ignite/pull/9194


   Thank you for submitting the pull request to the Apache Ignite.
   
   In order to streamline the review of the contribution 
   we ask you to ensure the following steps have been taken:
   
   ### The Contribution Checklist
   - [ ] There is a single JIRA ticket related to the pull request. 
   - [ ] The web-link to the pull request is attached to the JIRA ticket.
   - [ ] The JIRA ticket has the _Patch Available_ state.
   - [ ] The pull request body describes changes that have been made. 
   The description explains _WHAT_ and _WHY_ was made instead of _HOW_.
   - [ ] The pull request title is treated as the final commit message. 
   The following pattern must be used: `IGNITE-XXXX Change summary` where `XXXX` - number of JIRA issue.
   - [ ] A reviewer has been mentioned through the JIRA comments 
   (see [the Maintainers list](https://cwiki.apache.org/confluence/display/IGNITE/How+to+Contribute#HowtoContribute-ReviewProcessandMaintainers)) 
   - [ ] The pull request has been checked by the Teamcity Bot and 
   the `green visa` attached to the JIRA ticket (see [TC.Bot: Check PR](https://mtcga.gridgain.com/prs.html))
   
   ### Notes
   - [How to Contribute](https://cwiki.apache.org/confluence/display/IGNITE/How+to+Contribute)
   - [Coding abbreviation rules](https://cwiki.apache.org/confluence/display/IGNITE/Abbreviation+Rules)
   - [Coding Guidelines](https://cwiki.apache.org/confluence/display/IGNITE/Coding+Guidelines)
   - [Apache Ignite Teamcity Bot](https://cwiki.apache.org/confluence/display/IGNITE/Apache+Ignite+Teamcity+Bot)
   
   If you need any help, please email dev@ignite.apache.org or ask anу advice on http://asf.slack.com _#ignite_ channel.
   


-- 
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [ignite] ygerzhedovich commented on a change in pull request #9194: IGNITE-14953 Calcite. Sort out test scripts 'function'

Posted by GitBox <gi...@apache.org>.
ygerzhedovich commented on a change in pull request #9194:
URL: https://github.com/apache/ignite/pull/9194#discussion_r664631661



##########
File path: modules/calcite/src/test/sql/function/string/test_concat.test
##########
@@ -49,33 +46,30 @@ NULL
 NULL
 NULL
 
-# concat requires at least one argument
+# concat requires at least two argument
 statement error
 SELECT CONCAT()
 
 # concat with one argument works
-query T
+statement error
 SELECT CONCAT('hello')
-----
-hello
 
 # varargs concat
 query T
 SELECT CONCAT('hello', 33, 22)
 ----
 hello3322
 
-# CONCAT ignores null values
+# CONCAT with null
 query T
 SELECT CONCAT('hello', 33, NULL, 22, NULL)
 ----
-hello3322
+NULL

Review comment:
       I think such case should be filled as ticket




-- 
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: notifications-unsubscribe@ignite.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [ignite] ygerzhedovich commented on a change in pull request #9194: IGNITE-14953 Calcite. Sort out test scripts 'function'

Posted by GitBox <gi...@apache.org>.
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: notifications-unsubscribe@ignite.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [ignite] ygerzhedovich commented on a change in pull request #9194: IGNITE-14953 Calcite. Sort out test scripts 'function'

Posted by GitBox <gi...@apache.org>.
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: notifications-unsubscribe@ignite.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [ignite] ygerzhedovich commented on a change in pull request #9194: IGNITE-14953 Calcite. Sort out test scripts 'function'

Posted by GitBox <gi...@apache.org>.
ygerzhedovich commented on a change in pull request #9194:
URL: https://github.com/apache/ignite/pull/9194#discussion_r664598501



##########
File path: modules/calcite/src/test/java/org/apache/ignite/internal/processors/query/calcite/logical/SqlScriptRunner.java
##########
@@ -148,6 +148,19 @@ String nextLine() throws IOException {
             return null;
         }
 
+        /** */
+        String nextLineWithoutTrim() throws IOException {

Review comment:
       Looks like nextLine() should use nextLineWithoutTrim()




-- 
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: notifications-unsubscribe@ignite.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [ignite] ygerzhedovich commented on a change in pull request #9194: IGNITE-14953 Calcite. Sort out test scripts 'function'

Posted by GitBox <gi...@apache.org>.
ygerzhedovich commented on a change in pull request #9194:
URL: https://github.com/apache/ignite/pull/9194#discussion_r664631661



##########
File path: modules/calcite/src/test/sql/function/string/test_concat.test
##########
@@ -49,33 +46,30 @@ NULL
 NULL
 NULL
 
-# concat requires at least one argument
+# concat requires at least two argument
 statement error
 SELECT CONCAT()
 
 # concat with one argument works
-query T
+statement error
 SELECT CONCAT('hello')
-----
-hello
 
 # varargs concat
 query T
 SELECT CONCAT('hello', 33, 22)
 ----
 hello3322
 
-# CONCAT ignores null values
+# CONCAT with null
 query T
 SELECT CONCAT('hello', 33, NULL, 22, NULL)
 ----
-hello3322
+NULL

Review comment:
       I think such case should be fixed. I've created a ticket https://issues.apache.org/jira/browse/IGNITE-15066




-- 
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: notifications-unsubscribe@ignite.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [ignite] tledkov-gridgain merged pull request #9194: IGNITE-14953 Calcite. Sort out test scripts 'function'

Posted by GitBox <gi...@apache.org>.
tledkov-gridgain merged pull request #9194:
URL: https://github.com/apache/ignite/pull/9194


   


-- 
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: notifications-unsubscribe@ignite.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org