You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "alamb (via GitHub)" <gi...@apache.org> on 2024/08/01 15:46:21 UTC

[I] Support `||` for `StringViewArray` [arrow-rs]

alamb opened a new issue, #6175:
URL: https://github.com/apache/arrow-rs/issues/6175

   **Is your feature request related to a problem or challenge? Please describe what you are trying to do.**
   
   ```shell
   datafusion-cli
   ```
   
   Then run 
   ```sql
   DataFusion CLI v40.0.0
   > create table foo as values ('value1', arrow_cast('one', 'Utf8View')), ('value1', arrow_cast('two', 'Utf8View'));
   0 row(s) fetched.
   > select column2||'ff' from foo;
   Internal error: Data type Utf8View not supported for binary operation 'concat_elements' on string arrays.
   This was likely caused by a bug in DataFusion's code and we would welcome that you file an bug report in our issue tracker
   ```
   
   **Describe the solution you'd like**
   I would like the query to work 
   
   **Describe alternatives you've considered**
    We can probably get the query to work by fixing the coercion logic to coerce to `Utf8`, but that will be less efficient than implementing native StringView support for `concat` 
   
   
   The coercion is here: https://github.com/apache/datafusion/blob/6e2ff2955d96cacba905d24993353c7e5fe0cf93/datafusion/expr/src/type_coercion/binary.rs#L116-L122
   
   The physical expression implementation starts here
   
   https://github.com/apache/datafusion/blob/6e2ff2955d96cacba905d24993353c7e5fe0cf93/datafusion/physical-expr/src/expressions/binary.rs#L661
   
   **Additional context**
   <!--
   Add any other context or screenshots about the feature request 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: github-unsubscribe@arrow.apache.org.apache.org

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


Re: [I] Support string concat `||` for `StringViewArray` [arrow-rs]

Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb commented on issue #6175:
URL: https://github.com/apache/arrow-rs/issues/6175#issuecomment-2263397233

   If anyone wants to work on this, I would suggest starting with a PR that has some tests and does coercsion (which will make the query run) and then we can implement optimziation later


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