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

Andrei Sereda edited comment on CALCITE-2760 at 1/3/19 6:18 PM:
----------------------------------------------------------------

[~michaelmior] perhaps I misunderstood meaning of "unmapped". What I meant was 
queries like below : 

{code:sql}
-- "unmapped" didn't work previously because sorting was done on EXPR$0 instead 
of "some.field"
select * from elastic order by _MAP['some.field'] -- this is "unmapped" version
select * form view order by someField -- when using view it was working 
{code}
 
Can you give an example of SQL which fails for you ? 

When you say "unmapped" do you mean not present in [ES 
Mapping|https://www.elastic.co/guide/en/elasticsearch/reference/current/mapping.html]
 ?


was (Author: asereda):
[~michaelmior] perhaps I misunderstood meaning of "unmapped". What I meant was 
queries like below : 

{code:sql}
-- "unmapped" didn't work previously because sorting was done on EXPR$0 instead 
of "some.field"
select * from elastic order by _MAP['some.field'] -- this is "unmapped" version
select * form view order by someField -- when using view it was working 
{code}
 
Can you give an example of SQL which fails for you ? 

> Elasticsearch adapter can't sort on umapped fields
> --------------------------------------------------
>
>                 Key: CALCITE-2760
>                 URL: https://issues.apache.org/jira/browse/CALCITE-2760
>             Project: Calcite
>          Issue Type: Bug
>          Components: elasticsearch-adapter
>    Affects Versions: 1.17.0
>            Reporter: Michael Mior
>            Assignee: Julian Hyde
>            Priority: Major
>
> When trying to sort on unmapped fields, the adapter throws an exception. It 
> seems like {{ElasticsearchSortRule}} should check if the field is mapped 
> before it is applied so the sort can be performed by Calcite if Elasticsearch 
> can't do it.



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

Reply via email to