calcite-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrei Sereda (JIRA)" <j...@apache.org>
Subject [jira] [Created] (CALCITE-3056) Elasticsearch adapter. Invalid result with cast function on raw queries
Date Wed, 08 May 2019 23:25:00 GMT
Andrei Sereda created CALCITE-3056:
--------------------------------------

             Summary: Elasticsearch adapter. Invalid result with cast function on raw queries
                 Key: CALCITE-3056
                 URL: https://issues.apache.org/jira/browse/CALCITE-3056
             Project: Calcite
          Issue Type: Bug
          Components: elasticsearch-adapter
    Affects Versions: 1.19.0
            Reporter: Andrei Sereda
            Assignee: Andrei Sereda


Raw elastic queries (not based on views) return incorrect result when {{cast}} function is
used.

{code:sql}

-- does not work without view (returns null)
select max(cast(_MAP['foo'] as integer)) from elastic

-- query based on view works
create view elasticview as select cast(_MAP['foo'] as integer) as foo from elastic; 
-- works
select max(foo) from elasticview 
{code}




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message