You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Andrei Sereda (JIRA)" <ji...@apache.org> on 2019/05/08 23:25:00 UTC
[jira] [Created] (CALCITE-3056) Elasticsearch adapter. Invalid
result with cast function on raw queries
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)