[
https://issues.apache.org/jira/browse/DRILL-8094?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17477295#comment-17477295
]
ASF GitHub Bot commented on DRILL-8094:
---------------------------------------
jnturton commented on pull request #2416:
URL: https://github.com/apache/drill/pull/2416#issuecomment-1014685897
Hi @Leon-WTF, sorry about the long delay here. I wanted to try to remove
`if` statements but hadn't noticed that lazy splitting is possible for postive
index values making the cases more different than I'd realised. I came up with
an alternative implementation with the negative index case based on reversing
the original string, and the delimiter, then doing lazy splitting in the
forward direction and then reversing the selected part for the answer but in
the end I think it was worse than what's here.
I'll approve shortly.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
> 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)