[
https://issues.apache.org/jira/browse/ASTERIXDB-3562?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17927020#comment-17927020
]
ASF subversion and git services commented on ASTERIXDB-3562:
------------------------------------------------------------
Commit ac42a2aae911de860a1d81f7462ed647b656633b in asterixdb's branch
refs/heads/master from Ali Alsuliman
[ https://gitbox.apache.org/repos/asf?p=asterixdb.git;h=ac42a2aae9 ]
[ASTERIXDB-3562][COMP] Align subplan variable propagation with runtime output
- user model changes: no
- storage format changes: no
- interface changes: no
Details:
Subplan output tuple is formed by concatenating the input tuple
to the subplan and the subplan's root operator. The variable propagation
policy should do the same thing.
Ext-ref: MB-65248
Change-Id: I1c30a8fd7e0ab0a9c1629f749b5955b45b40b4d8
Reviewed-on: https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/19410
Tested-by: Ian Maxon <[email protected]>
Tested-by: Ali Alsuliman <[email protected]>
Reviewed-by: Ali Alsuliman <[email protected]>
Reviewed-by: Michael Blow <[email protected]>
Integration-Tests: Jenkins <[email protected]>
> Subplan variable propagation policy not aligned with its runtime
> ----------------------------------------------------------------
>
> Key: ASTERIXDB-3562
> URL: https://issues.apache.org/jira/browse/ASTERIXDB-3562
> Project: Apache AsterixDB
> Issue Type: Bug
> Components: COMP - Compiler
> Reporter: Ali Alsuliman
> Assignee: Ali Alsuliman
> Priority: Major
>
> The subplan output tuple is formed by concatenating the input tuple to the
> subplan and the subplan's root operator. The subplan's variable propagation
> policy is expected to do the same thing.
> The subplan variable propagation policy is not aligned with its runtime
> output tuple causing such a query to fail.
> {code:java}
> CREATE COLLECTION col PRIMARY KEY (id: int);
> SELECT array1[0:1] AS f_1,
> array1[0:2] AS f_2
> FROM col; {code}
> The plan for the query is:
> {code:java}
> distribute result [$$17]
> -- DISTRIBUTE_RESULT |PARTITIONED|
> exchange
> -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
> project ([$$17])
> -- STREAM_PROJECT |PARTITIONED|
> assign [$$17] <- [{"f_1": $$14, "f_2": $$16}]
> -- ASSIGN |PARTITIONED|
> project ([$$14, $$16])
> -- STREAM_PROJECT |PARTITIONED|
> subplan {
> assign [$$16] <- [array-slice($$20, 0, 2)]
> -- ASSIGN |LOCAL|
> nested tuple source
> -- NESTED_TUPLE_SOURCE |LOCAL|
> }
> -- SUBPLAN |PARTITIONED|
> subplan {
> assign [$$14] <- [array-slice($$20, 0, 1)]
> -- ASSIGN |LOCAL|
> nested tuple source
> -- NESTED_TUPLE_SOURCE |LOCAL|
> }
> -- SUBPLAN |PARTITIONED|
> project ([$$20])
> -- STREAM_PROJECT |PARTITIONED|
> assign [$$20] <- [$$collection2.getField("array1")]
> -- ASSIGN |PARTITIONED|
> project ([$$collection2])
> -- STREAM_PROJECT |PARTITIONED|
> exchange
> -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
> data-scan []<-[$$18, $$collection2, $$19] <-
> Default.collection2
> -- DATASOURCE_SCAN |PARTITIONED|
> exchange
> -- ONE_TO_ONE_EXCHANGE |PARTITIONED|
> empty-tuple-source
> -- EMPTY_TUPLE_SOURCE |PARTITIONED| {code}
> The runtime output for the below subplan is ($$20, $$20, $$14) where:
> * the first $$20 is coming from the project op: project ([$$20]).
> * the ($$20, $$14) is coming from the root assign op: assign [$$14].
> The variable propagation is also ($$20, $$20, $$14) which is matching:
> {code:java}
> subplan {
> assign [$$14] <- [array-slice($$20, 0, 1)]
> -- ASSIGN |LOCAL|
> nested tuple source
> -- NESTED_TUPLE_SOURCE |LOCAL|
> }
> -- SUBPLAN |PARTITIONED|
> project ([$$20]) {code}
> The runtime output for the second subplan is ($$20, $$20, $$14, $$20, $$20,
> $$14, $$16) where:
> * the first ($$20, $$20, $$14) is coming from the input subplan op.
> * the ($$20, $$20, $$14, $$16) is coming from the root assign op: assign
> [$$16].
> However, the variable propagation policy is ($$20, $$14, $$20, $$20, $$14,
> $$16) which is not matching.
> {code:java}
> subplan {
> assign [$$16] <- [array-slice($$20, 0, 2)]
> -- ASSIGN |LOCAL|
> nested tuple source
> -- NESTED_TUPLE_SOURCE |LOCAL|
> }
> -- SUBPLAN |PARTITIONED|
> subplan {
> assign [$$14] <- [array-slice($$20, 0, 1)]
> -- ASSIGN |LOCAL|
> nested tuple source
> -- NESTED_TUPLE_SOURCE |LOCAL|
> }
> -- SUBPLAN |PARTITIONED|
> project ([$$20]) {code}
>
> The duplication in the subplan output tuple is a different issue and should
> be addressed separately.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)