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

ZheHu commented on CALCITE-4860:
--------------------------------

For this case, I suppose we can enable "NULLS LAST/FIRST" syntax without 
aggregation. Because we've already filed 
[CALCITE-4868|https://issues.apache.org/jira/browse/CALCITE-4868] for such 
scene.
For example, the following case should work normally.
{code:java}
select col1 from view order by col1 asc nulls first
{code}

And make CALCITE-4868 focus on
{code:java}
select col1 from view group by col1 order by col1 asc nulls first
{code}

Appreciate any comments.

> In Elasticsearch adapter, support NULLS FIRST and NULLS LAST query
> ------------------------------------------------------------------
>
>                 Key: CALCITE-4860
>                 URL: https://issues.apache.org/jira/browse/CALCITE-4860
>             Project: Calcite
>          Issue Type: Bug
>          Components: elasticsearch-adapter
>    Affects Versions: 1.27.0
>            Reporter: xiong duan
>            Assignee: ZheHu
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 5h 50m
>  Remaining Estimate: 0h
>
> In Elasticsearch Adapter, The SQL:
> {code:java}
> @Test void integerCat3() {
>   CalciteAssert.that()
>       .with(newConnectionFactory())
>       .query("select cat1 from view order by cat1 nulls first")
>       .returns("cat1=a\n" +
>           "cat1=b\n" +
>           "cat1=null\n");
> }
> {code}
> NULLS FIRST don't handle.
> According  
> [es_missing_values|https://www.elastic.co/guide/en/elasticsearch/reference/current/sort-search-results.html#_missing_values]
>  . We can add another parameter in the script to implement this.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to