phoenix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <>
Subject [jira] [Commented] (PHOENIX-3477) Support sequence arithmetic in Calcite-Phoenix
Date Tue, 06 Dec 2016 20:16:59 GMT


ASF GitHub Bot commented on PHOENIX-3477:

Github user lomoree commented on a diff in the pull request:
    --- Diff: phoenix-core/src/it/java/org/apache/phoenix/calcite/ ---
    @@ -1343,6 +1343,28 @@ public void initTable() throws Exception {
                             {7L, "0000000005", "T5", "0000000005", "S5"},
                             {8L, "0000000006", "T6", "0000000006", "S6"}})
    --- End diff --
    While that was my initial thinking, upon looking deeper I discovered a different source
for the issue
    The reason a ServerProject was being created was because of visitCall(). It wasn't recursively
checking for sequences. Therefore, when an operator like SqlKind.PLUS was present and the
sequence was present, the sequence would be pushed down to a child operand and not be seen
by visitCall()
    PhoenixConverterRules is designed so that a ServerProject does not get created if a sequence
is present
    private static Predicate<LogicalProject> NO_SEQUENCE = new Predicate<LogicalProject>()
                public boolean apply(LogicalProject input) {
                    return !CalciteUtils.hasSequenceValueCall(input);

> Support sequence arithmetic in Calcite-Phoenix
> ----------------------------------------------
>                 Key: PHOENIX-3477
>                 URL:
>             Project: Phoenix
>          Issue Type: Sub-task
>            Reporter: Eric Lomore
>            Assignee: Eric Lomore
> When a sequence is wrapped inside an arithmetic operator it is routed through PhoenixServerProject
which does not currently have sequence support

This message was sent by Atlassian JIRA

View raw message