[
https://issues.apache.org/jira/browse/CALCITE-2323?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16489380#comment-16489380
]
Julian Hyde commented on CALCITE-2323:
--------------------------------------
Almost there:
* You got the JIRA case number wrong (1313) in the test javadoc
* I think a sub-class of SqlValidator is overkill. You can just configure a
validator: {code} validator.setIdentifierExpansion(true);
validator.setDefaultNullCollation(config.defaultNullCollation());{code}
* Consider using the same pattern as {{convertOrderItem}}, where we pass in the
default for Direction and NullDirection and it recursively calls itself if it
sees ASC or DESC or NULLS FIRST or NULLS LAST. This is the functional
programming style and I think it is easier to understand.
> The configuration parameter "defaultNullCollation" which enum NullCollation {
> LOW, HIGH, FIRST, LAST } to allow alternative policies, but it can't take
> effect for over();
> --------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: CALCITE-2323
> URL: https://issues.apache.org/jira/browse/CALCITE-2323
> Project: Calcite
> Issue Type: Bug
> Components: core
> Reporter: John Fang
> Assignee: Julian Hyde
> Priority: Major
>
> For example, the following query:
> *select deptno, rank() over(partition by empno order by deptno) from emp
> order by row_number() over(partition by empno order by deptno.*
> The default null order is nulls last for deptno in calcite. But the null
> order still is nulls last if we set the parameter "defaultNullCollation" with
> NullCollation.LOW.
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)