You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@drill.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2022/01/08 08:52:00 UTC

[jira] [Commented] (DRILL-8094) Support reverse truncation for split_part udf

    [ https://issues.apache.org/jira/browse/DRILL-8094?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17471029#comment-17471029 ] 

ASF GitHub Bot commented on DRILL-8094:
---------------------------------------

Leon-WTF commented on a change in pull request #2416:
URL: https://github.com/apache/drill/pull/2416#discussion_r780648058



##########
File path: exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/StringFunctions.java
##########
@@ -416,16 +417,25 @@ public void setup() {
 
     @Override
     public void eval() {
-      if (index.value < 1) {
+      if (index.value == 0) {

Review comment:
       > Sigh, 1-based indexing. I think the logic you chose in this PR for non-positive index values is the best we can do, considering.
   @jnturton Hi James, anything wrong here?




-- 
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: dev-unsubscribe@drill.apache.org

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


> Support reverse truncation for split_part udf
> ---------------------------------------------
>
>                 Key: DRILL-8094
>                 URL: https://issues.apache.org/jira/browse/DRILL-8094
>             Project: Apache Drill
>          Issue Type: Improvement
>            Reporter: wtf
>            Priority: Minor
>
> suport split_part('a,b,c,d', ',' , -2, -1) = 'c,d' and split_part('a,b,c,d', ',' , -3) = 'b'



--
This message was sent by Atlassian Jira
(v8.20.1#820001)