You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@arrow.apache.org by "Andy Grove (Jira)" <ji...@apache.org> on 2019/08/28 13:40:00 UTC
[jira] [Commented] (ARROW-6372) [Rust][Datafusion] Predictate push
down optimization can break query plan
[ https://issues.apache.org/jira/browse/ARROW-6372?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16917782#comment-16917782 ]
Andy Grove commented on ARROW-6372:
-----------------------------------
Thanks Paddy. Here is a unit test to reproduce this (can be added to {{type_coercion.rs}}):
{code:java}
#[test]
fn test_add_u32_i64() {
binary_cast_test(
DataType::UInt32,
DataType::Int64,
"CAST(#0 AS Int64) Plus #1",
);
binary_cast_test(
DataType::Int64,
DataType::UInt32,
"#0 Plus CAST(#1 AS Int64)",
);
} {code}
The issue is that theĀ {{can_coerce_from}} function in {{datafusion/src/logicalplan.rs}} does not support automatic coercion between signed and unsigned types, and is inconsistent with the logic in theĀ {{get_supertype}} method in {{datafusion/src/optimizer/utils.rs}}.
This is also somewhat related to https://issues.apache.org/jira/browse/ARROW-4957
> [Rust][Datafusion] Predictate push down optimization can break query plan
> -------------------------------------------------------------------------
>
> Key: ARROW-6372
> URL: https://issues.apache.org/jira/browse/ARROW-6372
> Project: Apache Arrow
> Issue Type: Bug
> Components: Rust - DataFusion
> Affects Versions: 0.14.1
> Reporter: Paddy Horan
> Priority: Major
> Fix For: 0.15.0
>
>
> The following code reproduces the issue:
> [https://gist.github.com/paddyhoran/598db6cbb790fc5497320613e54a02c6]
> If you disable the predicate push down optimization it works fine.
--
This message was sent by Atlassian Jira
(v8.3.2#803003)