You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Haisheng Yuan (Jira)" <ji...@apache.org> on 2020/05/21 22:53:00 UTC
[jira] [Updated] (CALCITE-4018) Implement trait propagation for
EnumerableValues
[ https://issues.apache.org/jira/browse/CALCITE-4018?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Haisheng Yuan updated CALCITE-4018:
-----------------------------------
Description:
Only passThrough is needed.
Currently, when Values is created, it will enumerate all the possible collations no matter parent operator requires it or not, it will be a disaster if the Values has thousands of columns, and the parent operator may be just a hash aggregate or hashjoin, which doesn't care about its collation.
The collation should be created on demand by calling passThrough.
e.g.
{code:java}
SELECT * from (values
(1, 1),
(2, 1),
(1, 2),
(2, 2)
) as t(a, b)
order by b, a
{code}
Currently Calcite will generate plan:
{code:java}
EnumerableSort(sort0=[$1], sort1=[$0], dir0=[ASC], dir1=[ASC])
EnumerableValues(tuples=[[{ 1, 1 }, { 2, 1 }, { 1, 2 }, { 2, 2 }]])
{code}
But after this JIRA, I am expecting a plan without Sort.
was:
Only passThrough is needed.
Currently, when Values is created, it will enumerate all the possible collations no matter parent operator requires it or not, it will be a disaster if the Values has thousands of columns, and the parent operator may be just a hash aggregate or hashjoin, which doesn't care about its collation.
The collation should be created on demand by calling passThrough.
> Implement trait propagation for EnumerableValues
> -------------------------------------------------
>
> Key: CALCITE-4018
> URL: https://issues.apache.org/jira/browse/CALCITE-4018
> Project: Calcite
> Issue Type: Improvement
> Components: core
> Reporter: Haisheng Yuan
> Priority: Major
>
> Only passThrough is needed.
> Currently, when Values is created, it will enumerate all the possible collations no matter parent operator requires it or not, it will be a disaster if the Values has thousands of columns, and the parent operator may be just a hash aggregate or hashjoin, which doesn't care about its collation.
> The collation should be created on demand by calling passThrough.
> e.g.
> {code:java}
> SELECT * from (values
> (1, 1),
> (2, 1),
> (1, 2),
> (2, 2)
> ) as t(a, b)
> order by b, a
> {code}
> Currently Calcite will generate plan:
> {code:java}
> EnumerableSort(sort0=[$1], sort1=[$0], dir0=[ASC], dir1=[ASC])
> EnumerableValues(tuples=[[{ 1, 1 }, { 2, 1 }, { 1, 2 }, { 2, 2 }]])
> {code}
> But after this JIRA, I am expecting a plan without Sort.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)