[
https://issues.apache.org/jira/browse/CALCITE-6440?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17861183#comment-17861183
]
Caican Cai commented on CALCITE-6440:
-------------------------------------
[~julianhyde] Thank you Julian for your answer. The current
SortRemoveConstantKeysRule can already do this, but what I want to do is to
delete. but what I want to do is to delete this layer of redundant Project.
{code:java}
LogicalProject(EMPNO=[$0], ENAME=[$1], JOB=[$2], MGR=[$3], HIREDATE=[$4],
SAL=[$5], COMM=[$6], DEPTNO=[$7], SLACKER=[$8], EXPR$9=[null:NULL]) {code}
It seems that it is not suitable to add a RelOptRule to do this. I will see if
calcite has similar functions. If not, I will try to improve it.
Close this jira first. After I find a suitable solution, I will reopen this
jira and modify the summary.
> SortRemoveConstantKeysRule should remove NULL literal sort keys (e.g. ORDER
> BY NULL)
> ------------------------------------------------------------------------------------
>
> Key: CALCITE-6440
> URL: https://issues.apache.org/jira/browse/CALCITE-6440
> Project: Calcite
> Issue Type: New Feature
> Components: core
> Affects Versions: 1.37.0
> Reporter: Caican Cai
> Priority: Major
> Labels: pull-request-available
> Fix For: 1.38.0
>
>
> For the following SQL:
> {code:java}
> select * from task order by null; {code}
> We could rewrite it to:
> {code:java}
> select * from task;{code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)