Skip to content

Commit

Permalink
Address new comments
Browse files Browse the repository at this point in the history
  • Loading branch information
zhuqi-lucas committed Nov 2, 2024
1 parent bdd4452 commit 264571c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -917,7 +917,7 @@ public static List<String> split(String s, String delimiter) {

/** SQL {@code SPLIT_PART(string, string, int)} function. */
public static String splitPart(String s, String delimiter, int n) {
if (Strings.isNullOrEmpty(s) || delimiter == null || delimiter.isEmpty() || n == 0) {
if (Strings.isNullOrEmpty(s) || Strings.isNullOrEmpty(delimiter)) {
return "";
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10929,6 +10929,7 @@ void checkEndsWith(SqlOperatorFixture f0, FunctionAlias functionAlias) {

f.checkNull("SPLIT_PART(null, ',', 1)");
f.checkNull("SPLIT_PART('abc', null, 1)");
f.checkNull("SPLIT_PART('abc', ',', null)");
}

/** Test case for
Expand Down

0 comments on commit 264571c

Please sign in to comment.