You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@drill.apache.org by "Steven Phillips (JIRA)" <ji...@apache.org> on 2015/06/25 04:52:04 UTC

[jira] [Updated] (DRILL-3366) Short circuit of OR expression causes incorrect partitioning

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

Steven Phillips updated DRILL-3366:
-----------------------------------
    Attachment: DRILL-3366.patch

By using a function name different than "OR", even though it maps to the exact same function, the short-circuit is not used, so this problem is avoided.

> Short circuit of OR expression causes incorrect partitioning
> ------------------------------------------------------------
>
>                 Key: DRILL-3366
>                 URL: https://issues.apache.org/jira/browse/DRILL-3366
>             Project: Apache Drill
>          Issue Type: Bug
>          Components: Execution - Codegen
>            Reporter: Steven Phillips
>            Assignee: Steven Phillips
>         Attachments: DRILL-3366.patch
>
>
> CTAS partitioning relies on evaluating the expression newPartitionValue(column A) || newPartitionValue(column B) || ..
> to determine if there is a new partition should start. The "newPartitionValue" function returns true if the current value of the expression is different from the previous value. The function holds some state in the workspace (the previous value), and thus needs to be evaluated every time. Short circuit expression evaluation causes this to not be the case.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)