You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@arrow.apache.org by "Todd Farmer (Jira)" <ji...@apache.org> on 2022/07/12 14:05:02 UTC

[jira] [Assigned] (ARROW-11562) [C++][Dataset] Provide more robust handling of comparison guarantees in the presence of implicit casts

     [ https://issues.apache.org/jira/browse/ARROW-11562?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Todd Farmer reassigned ARROW-11562:
-----------------------------------

    Assignee:     (was: Ben Kietzman)

This issue was last updated over 90 days ago, which may be an indication it is no longer being actively worked. To better reflect the current state, the issue is being unassigned. Please feel free to re-take assignment of the issue if it is being actively worked, or if you plan to start that work soon.

> [C++][Dataset] Provide more robust handling of comparison guarantees in the presence of implicit casts
> ------------------------------------------------------------------------------------------------------
>
>                 Key: ARROW-11562
>                 URL: https://issues.apache.org/jira/browse/ARROW-11562
>             Project: Apache Arrow
>          Issue Type: Bug
>          Components: C++
>    Affects Versions: 3.0.0
>            Reporter: Ben Kietzman
>            Priority: Major
>
> After ARROW-8919 it's possible that a field reference may be wrapped in an implicit cast, which complicates destructuring during expression simplification. In particular, some errors can arise as a result of assuming that casts will preserve numeric ordering:
> {code:c++}
> int two_28 = 1 << 28;
> auto partition_expr = less_equal(field_ref("i32"), literal(two_28 + 1));
> auto filter = greater(
>   cast(field_ref("i32"), float32()),
>   literal(float(two_28)));
> {code}
> Currently the RHS of the filter and the partition expression will be considered equal since casting {{two_28+1}} to float results in the same value as casting {{two_28}} to float (due to limited FP precision). Since {{x <= y}} and {{x > y}} are disjoint, the partition will skipped entirely including any rows where {{i32 == two_28+1}} (which *should* be selected by this filter).



--
This message was sent by Atlassian Jira
(v8.20.10#820010)