You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@asterixdb.apache.org by "Ian Maxon (Jira)" <ji...@apache.org> on 2024/09/13 17:04:00 UTC
[jira] [Updated] (ASTERIXDB-3501) Redundant listify in plan
[ https://issues.apache.org/jira/browse/ASTERIXDB-3501?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Ian Maxon updated ASTERIXDB-3501:
---------------------------------
Labels: triaged (was: )
> Redundant listify in plan
> -------------------------
>
> Key: ASTERIXDB-3501
> URL: https://issues.apache.org/jira/browse/ASTERIXDB-3501
> Project: Apache AsterixDB
> Issue Type: Bug
> Components: COMP - Compiler
> Reporter: Ali Alsuliman
> Assignee: Peeyush Gupta
> Priority: Major
> Labels: triaged
>
> For the following query:
> {noformat}
> WITH c1 AS(
> SELECT f1,
> f2
> FROM collection1 b),
> c2 AS(
> SELECT f1,
> (
> SELECT COUNT(1) FILTER(WHERE b.f2>=a.f2 AND b.f2<=a.f2) AS counts
> FROM c1 b
> WHERE b.f1=a.f1
> )[0] counts
> FROM c1 a)
> SELECT
> COUNT(*) counts
> FROM c2 a
> {noformat}
> The plan contains a redundant listify:
> {noformat}
> unnest $#3 <- scan-collection($$135) [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
> -- UNNEST |LOCAL|
> group by ([]) decor ([$$165; $$170; $$171; $$b]) {
> aggregate [$$135] <- [listify({"b": $$129})] [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
> -- AGGREGATE |LOCAL|
> select (not(is-missing($$175))) [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
> -- STREAM_SELECT |LOCAL|
> nested tuple source [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
> -- NESTED_TUPLE_SOURCE |LOCAL|
> } [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
> -- MICRO_PRE_CLUSTERED_GROUP_BY[] |LOCAL|
> nested tuple source [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
> -- NESTED_TUPLE_SOURCE |LOCAL|
> } [cardinality: 0.0, op-cost: 0.0, total-cost: 0.0]
> -- PRE_CLUSTERED_GROUP_BY[$$165] |PARTITIONED|
> {noformat}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)