phoenix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (PHOENIX-3264) Allow TRUE and FALSE to be used as literal constants
Date Thu, 29 Sep 2016 19:01:20 GMT

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

ASF GitHub Bot commented on PHOENIX-3264:
-----------------------------------------

Github user lomoree commented on a diff in the pull request:

    https://github.com/apache/phoenix/pull/212#discussion_r81210767
  
    --- Diff: phoenix-core/src/main/java/org/apache/phoenix/calcite/CalciteUtils.java ---
    @@ -1036,4 +1048,40 @@ public Void visitCall(RexCall call) {
                 return null;
             }
         }
    +
    +    public static Object convertLiteral(SqlLiteral literal, PhoenixRelImplementor implementor)
{
    +        try {
    +            final SchemaPlus rootSchema = Frameworks.createRootSchema(true);
    +            final FrameworkConfig config = Frameworks.newConfigBuilder()
    +                    .parserConfig(SqlParser.Config.DEFAULT)
    +                    .defaultSchema(rootSchema).build();
    +            Planner planner = Frameworks.getPlanner(config);
    --- End diff --
    
    I could also abstract this to the SqlOptionNode and pass it in to this method. I had that
at one point but ended up opting for this since the code didn't seem like it belonged there.
Let me know which you prefer.


> Allow TRUE and FALSE to be used as literal constants
> ----------------------------------------------------
>
>                 Key: PHOENIX-3264
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-3264
>             Project: Phoenix
>          Issue Type: Sub-task
>            Reporter: James Taylor
>            Assignee: Eric Lomore
>         Attachments: Sql2RelImplementation.png, SqlLiteral.png, SqlNodeToRexConverterImpl.png,
SqlOptionNode.png, objectdependencies.png, objectdependencies2.png, stacktrace.png
>
>
> Phoenix supports TRUE and FALSE as boolean literals, but perhaps Calcite doesn't? Looks
like this is leading to a fair number of failures.



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

Mime
View raw message