KKcorps commented on a change in pull request #8304:
URL: https://github.com/apache/pinot/pull/8304#discussion_r825760858



##########
File path: 
pinot-common/src/main/java/org/apache/pinot/common/function/scalar/StringFunctions.java
##########
@@ -392,6 +431,45 @@ public static String normalize(String input, String form) {
     return StringUtils.split(input, delimiter);
   }
 
+  /**
+   * see String#split(String)
+   * @param input
+   * @param delimiter
+   * @return splits string on specified delimiter and returns an array.
+   */
+  @ScalarFunction
+  public static String split(String input, String delimiter, int index) {

Review comment:
       I have kept it consistent with existing pinot queries. In Presto, every 
string function operates on the expectation that String index starts with 1. 
   Pinot's function on the other hand have String index 0.
   If we want to change it, we should change all of them or none of them.
   
   Also, changing them will break user queries who are already using existing 
functions.




-- 
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: commits-unsubscr...@pinot.apache.org

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



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org
For additional commands, e-mail: commits-h...@pinot.apache.org

Reply via email to