Baymine commented on PR #66181:
URL: https://github.com/apache/doris/pull/66181#issuecomment-5174455897

   > as above, split_by_string and split_part behave differently in various 
scenarios. It's better to let user to decide using which function case by case.
   
   Thx for the comment, I can see the issue, but one thing I want to discuss 
about the behaviour for the function result when source string does not contain 
delim for this function: `split_part('abc',',',1)`. I evaluated it in Trino, 
Spark, Postgres; all return the whole string in such case. It is a bit 
confusing that this case returns null in Doris. Do you have any idea why that 
case would return null instead of the whole string?
   
   ```
   presto> select split_part('abc',',',1);
    _col0
   -------
    abc
   (1 row)
   
   postgre=# select split_part('abc',',',1);
    split_part
   ------------
    abc
   (1 row)
   
   spark-sql (default)> select split_part('abc',',',1);
   abc
   Time taken: 3.537 seconds, Fetched 1 row(s)
   ```


-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to