danny0405 commented on a change in pull request #1421: [CALCITE-3306] Add
built-in REGEXP_SPLIT_TO_ARRAY function.
URL: https://github.com/apache/calcite/pull/1421#discussion_r326972617
##########
File path:
core/src/test/java/org/apache/calcite/sql/test/SqlOperatorBaseTest.java
##########
@@ -6274,6 +6274,65 @@ private void checkNullOperand(SqlTester tester, String
op) {
tester.checkNull("substring(cast(null as varchar(1)),1,2)");
}
+ @Test public void testRegexpSplitToArrayFunction() {
+ final SqlTester t = tester(SqlLibrary.POSTGRESQL);
+ t.setFor(SqlLibraryOperators.REGEXP_SPLIT_TO_ARRAY);
+ t.checkString(
+ "regexp_split_to_array('','a')",
+ "[]",
Review comment:
Can we also add some tests for implicit type coercion, for example
`regexp_split_to_array(1245, '2')`.
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services