phoenix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Eric Lomore (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (PHOENIX-3350) Enable utility functions for SELECT queries
Date Thu, 06 Oct 2016 15:50:20 GMT

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

Eric Lomore updated PHOENIX-3350:
---------------------------------
    Description: 
Some functions such as TO_DATE & TO_CHAR are breaking in SELECT statements. These functions
do however work in DDL statements such as create view.

{{"SELECT * FROM t WHERE k1 = TO_DATE(TO_CHAR(CURRENT_DATE())"}}
org.apache.calcite.sql.validate.SqlValidatorException: No match found for function signature
TO_DATE()

But once wrapped in a DDL statement, it executes fine:
{{"CREATE VIEW v AS SELECT * FROM t WHERE k1 = TO_DATE(TO_CHAR(CURRENT_DATE())}}



  was:
UDFs such as TO_DATE & TO_CHAR are breaking in SELECT statements. These functions do however
work in DDL statements such as create view.

{{"SELECT * FROM t WHERE k1 = TO_DATE(TO_CHAR(CURRENT_DATE())"}}
org.apache.calcite.sql.validate.SqlValidatorException: No match found for function signature
TO_DATE()

But once wrapped in a DDL statement, it executes fine:
{{"CREATE VIEW v AS SELECT * FROM t WHERE k1 = TO_DATE(TO_CHAR(CURRENT_DATE())}}



        Summary: Enable utility functions for SELECT queries  (was: Enable UDF functions for
SELECT queries)

> Enable utility functions for SELECT queries
> -------------------------------------------
>
>                 Key: PHOENIX-3350
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-3350
>             Project: Phoenix
>          Issue Type: Sub-task
>            Reporter: Eric Lomore
>            Assignee: Eric Lomore
>
> Some functions such as TO_DATE & TO_CHAR are breaking in SELECT statements. These
functions do however work in DDL statements such as create view.
> {{"SELECT * FROM t WHERE k1 = TO_DATE(TO_CHAR(CURRENT_DATE())"}}
> org.apache.calcite.sql.validate.SqlValidatorException: No match found for function signature
TO_DATE()
> But once wrapped in a DDL statement, it executes fine:
> {{"CREATE VIEW v AS SELECT * FROM t WHERE k1 = TO_DATE(TO_CHAR(CURRENT_DATE())}}



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

Mime
View raw message