phoenix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Taylor (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (PHOENIX-1987) SIGN built-in function should be order preserving
Date Thu, 04 Jun 2015 21:22:38 GMT

    [ https://issues.apache.org/jira/browse/PHOENIX-1987?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14573608#comment-14573608
] 

James Taylor commented on PHOENIX-1987:
---------------------------------------

+1. In a follow up test, to confirm that this optimizes out the ORDER BY, you can add another
test in QueryCompilerTest simiar to testOrderByOrderPreservingFwd and testOrderByOrderPreservingRev.
Something like:
{code}
SELECT * FROM T ORDER BY SIGN(PK1),PK2
{code}
Then confirm that the QueryPlan has an empty order by.

> SIGN built-in function should be order preserving
> -------------------------------------------------
>
>                 Key: PHOENIX-1987
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-1987
>             Project: Phoenix
>          Issue Type: Sub-task
>            Reporter: James Taylor
>            Assignee: Shuxiong Ye
>             Fix For: 5.0.0, 4.5.0, 4.4.1
>
>         Attachments: 0001-PHOENIX-1987-SIGN-built-in-function-should-be-order_v2.patch
>
>
> The SIGN built-in function preserves the order of its input. This needs to be explicitly
implemented in SignFunction by implementing the following method:
> {code}
>     public OrderPreserving preservesOrder() {
>         return OrderPreserving.YES;
>     }
> {code}
> This will allow certain optimizations reducing the amount of memory and/or buffering
that is required if SIGN is used in a GROUP BY or ORDER BY clause.



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

Mime
View raw message