You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2022/03/27 13:54:56 UTC

[GitHub] [arrow-datafusion] mateuszkj opened a new issue #2100: function 'concat_ws' should ignore NULL in last argument

mateuszkj opened a new issue #2100:
URL: https://github.com/apache/arrow-datafusion/issues/2100


   **Describe the bug**
   Function *concat_ws* is not ignoring NULL in last argument and seperator text is added at the end of the result.
   
   **To Reproduce**
   ```sql
   SELECT concat_ws('|', 'a', NULL);
   -- Result: a|
   ```
   
   Tested on master (refs 73ea6e1)
   
   **Expected behavior**
   ```sql
   SELECT concat_ws('|', 'a', NULL);
   -- Result: a
   ```
   There should not be spectator added as the end of result.
   
   **Additional context**
   There is test case for ignoring NULLs in arguments but only in the middle: https://github.com/apache/arrow-datafusion/blob/master/datafusion/tests/sql/expr.rs#L553=
   
   Function description says NULLs should be ignored: https://github.com/apache/arrow-datafusion/blob/master/datafusion-physical-expr/src/string_expressions.rs#L326=
    
   


-- 
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: github-unsubscribe@arrow.apache.org

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



[GitHub] [arrow-datafusion] WinkerDu commented on issue #2100: function 'concat_ws' should ignore NULL in last argument

Posted by GitBox <gi...@apache.org>.
WinkerDu commented on issue #2100:
URL: https://github.com/apache/arrow-datafusion/issues/2100#issuecomment-1083582381


   A raw fix here #2128


-- 
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: github-unsubscribe@arrow.apache.org

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



[GitHub] [arrow-datafusion] yjshen closed issue #2100: function 'concat_ws' should ignore NULL in last argument

Posted by GitBox <gi...@apache.org>.
yjshen closed issue #2100:
URL: https://github.com/apache/arrow-datafusion/issues/2100


   


-- 
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: github-unsubscribe@arrow.apache.org

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



[GitHub] [arrow-datafusion] doki23 edited a comment on issue #2100: function 'concat_ws' should ignore NULL in last argument

Posted by GitBox <gi...@apache.org>.
doki23 edited a comment on issue #2100:
URL: https://github.com/apache/arrow-datafusion/issues/2100#issuecomment-1080628378


   I think we can define the `owned_string` to `Vec<String>` and use [join](https://doc.rust-lang.org/std/primitive.slice.html#method.join) to replace `String::push_str`.


-- 
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: github-unsubscribe@arrow.apache.org

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



[GitHub] [arrow-datafusion] doki23 commented on issue #2100: function 'concat_ws' should ignore NULL in last argument

Posted by GitBox <gi...@apache.org>.
doki23 commented on issue #2100:
URL: https://github.com/apache/arrow-datafusion/issues/2100#issuecomment-1080628378


   I think we can use [join](https://doc.rust-lang.org/std/primitive.slice.html#method.join) to replace `String::push_str`.


-- 
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: github-unsubscribe@arrow.apache.org

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