You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@arrow.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2021/02/19 19:53:00 UTC
[jira] [Updated] (ARROW-11174) [C++][Dataset] Make Expressions
available for projection
[ https://issues.apache.org/jira/browse/ARROW-11174?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
ASF GitHub Bot updated ARROW-11174:
-----------------------------------
Labels: pull-request-available (was: )
> [C++][Dataset] Make Expressions available for projection
> --------------------------------------------------------
>
> Key: ARROW-11174
> URL: https://issues.apache.org/jira/browse/ARROW-11174
> Project: Apache Arrow
> Issue Type: Bug
> Components: C++
> Affects Versions: 2.0.0
> Reporter: Ben Kietzman
> Assignee: Ben Kietzman
> Priority: Major
> Labels: pull-request-available
> Fix For: 4.0.0
>
> Time Spent: 10m
> Remaining Estimate: 0h
>
> RecordBatchProjector should be replaced by an expression calling the "project" compute function.
> Projection currently supports only reordering and subselection of fields, materializing virtual columns where necessary. Replacement with an Expression will enable specifying arbitrary expressions for projected columns:
> {code:java}
> // project an explicit selection:
> // SELECT a as "a", b as "b" ...
> project({field_ref("a"), field_ref("b")}, {"a", "b"});
> // project an arithmetic expression:
> // SELECT a + b as "a + b" ...
> project({add(field_ref("a"), field_ref("b"))}, {"a + b"}){code}
> This will also allow the same expression optimization machinery used for filters to be directly applied to projections. Virtual columns become a consequence of constant folding:
> {code:java}
> // project in a partition where a == 3:
> assert(
> SimplifyWithGuarantee(
> project({field_ref("a"), field_ref("b")}, {"a", "b"}),
> equal(field_ref("a"), literal(3))
> )
> == project({literal(3), field_ref("b")}, {"a", "b"})
> ){code}
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)