[jira] [Commented] (ASTERIXDB-2331) Plan branch repeated

2018-03-15 Thread Taewoo Kim (JIRA)

[ 
https://issues.apache.org/jira/browse/ASTERIXDB-2331?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16401248#comment-16401248
 ] 

Taewoo Kim commented on ASTERIXDB-2331:
---

No problem. It's just a complex query.

> Plan branch repeated
> 
>
> Key: ASTERIXDB-2331
> URL: https://issues.apache.org/jira/browse/ASTERIXDB-2331
> Project: Apache AsterixDB
>  Issue Type: Bug
>  Components: COMP - Compiler
>Reporter: Wail Alkowaileet
>Assignee: Taewoo Kim
>Priority: Major
>
> I didn't investigate. But it looks like unmaintained Split output.
> DDL
> {noformat}
> DROP DATAVERSE SocialNetworkData IF EXISTS;
> CREATE DATAVERSE SocialNetworkData;
> USE SocialNetworkData;
> create type ChirpMessageType as {
> chirpid: int64,
> send_time: datetime
> };
> create type GleambookUserType as {
> id: int64,
> user_since: datetime
> };
> create type GleambookMessageType as {
> message_id: int64,
> author_id: int64,
> send_time: datetime
> };
> create dataset GleambookMessages(GleambookMessageType)
> primary key message_id;
> create dataset GleambookUsers(GleambookUserType)
> primary key id;
> create dataset ChirpMessages(ChirpMessageType)
> primary key chirpid;
> create index usrSinceIx on GleambookUsers(user_since);
> create index sndTimeIx on ChirpMessages(send_time);
> create index authorIdIx on GleambookMessages(author_id);
> {noformat}
> Query:
> {noformat}
> USE SocialNetworkData;
> EXPLAIN
> SELECT g.message_id
> FROM GleambookUsers as u, GleambookMessages as g
> WHERE u.id/*+indexnl*/ = g.author_id 
> AND u.user_since = datetime("2013-04-16T09:45:46")
> {noformat}
> Plan:
> {noformat}
> distribute result [$$28]
> -- DISTRIBUTE_RESULT  |PARTITIONED|
>   exchange
>   -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
> union ($$54, $$55, $$28)
> -- UNION_ALL  |PARTITIONED|
>   exchange
>   -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
> project ([$$54])
> -- STREAM_PROJECT  |PARTITIONED|
>   assign [$$54] <- [{"message_id": $$52}]
>   -- ASSIGN  |PARTITIONED|
> project ([$$52])
> -- STREAM_PROJECT  |PARTITIONED|
>   select (eq($$29, $$53.getField(1)))
>   -- STREAM_SELECT  |PARTITIONED|
> project ([$$29, $$52, $$53])
> -- STREAM_PROJECT  |PARTITIONED|
>   exchange
>   -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
> unnest-map [$$52, $$53] <- 
> index-search("GleambookMessages", 0, "SocialNetworkData", 
> "GleambookMessages", TRUE, FALSE, 1, $$46, 1, $$46, TRUE, TRUE, TRUE)
> -- BTREE_SEARCH  |PARTITIONED|
>   exchange
>   -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
> project ([$$29, $$46])
> -- STREAM_PROJECT  |PARTITIONED|
>   exchange
>   -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
> split ($$47)
> -- SPLIT  |PARTITIONED|
>   exchange
>   -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
> project ([$$29, $$46, $$47])
> -- STREAM_PROJECT  |PARTITIONED|
>   exchange
>   -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
> unnest-map [$$45, $$46, $$47] <- 
> index-search("authorIdIx", 0, "SocialNetworkData", "GleambookMessages", TRUE, 
> TRUE, 1, $$29, 1, $$29, TRUE, TRUE, TRUE)
> -- BTREE_SEARCH  |PARTITIONED|
>   exchange
>   -- BROADCAST_EXCHANGE  |PARTITIONED|
> union ($$43, $$38, $$29)
> -- UNION_ALL  |PARTITIONED|
>   exchange
>   -- ONE_TO_ONE_EXCHANGE  
> |PARTITIONED|
> project ([$$43])
> -- STREAM_PROJECT  |PARTITIONED|
>   select (eq($$33, datetime: { 
> 2013-04-16T09:45:46.000Z }))
>   -- STREAM_SELECT  |PARTITIONED|
> project ([$$43, $$33])
> -- STREAM_PROJECT  
> |PARTITIONED|
>   assign [$$33] <- 
> [$$44.getField(1)]
>   -- ASSIGN  |PARTITIONED|
> exchange
>

[jira] [Commented] (ASTERIXDB-2331) Plan branch repeated

2018-03-15 Thread Wail Alkowaileet (JIRA)

[ 
https://issues.apache.org/jira/browse/ASTERIXDB-2331?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16401189#comment-16401189
 ] 

Wail Alkowaileet commented on ASTERIXDB-2331:
-

Got it :)
I was confused .. sorry about that.

> Plan branch repeated
> 
>
> Key: ASTERIXDB-2331
> URL: https://issues.apache.org/jira/browse/ASTERIXDB-2331
> Project: Apache AsterixDB
>  Issue Type: Bug
>  Components: COMP - Compiler
>Reporter: Wail Alkowaileet
>Assignee: Taewoo Kim
>Priority: Major
>
> I didn't investigate. But it looks like unmaintained Split output.
> DDL
> {noformat}
> DROP DATAVERSE SocialNetworkData IF EXISTS;
> CREATE DATAVERSE SocialNetworkData;
> USE SocialNetworkData;
> create type ChirpMessageType as {
> chirpid: int64,
> send_time: datetime
> };
> create type GleambookUserType as {
> id: int64,
> user_since: datetime
> };
> create type GleambookMessageType as {
> message_id: int64,
> author_id: int64,
> send_time: datetime
> };
> create dataset GleambookMessages(GleambookMessageType)
> primary key message_id;
> create dataset GleambookUsers(GleambookUserType)
> primary key id;
> create dataset ChirpMessages(ChirpMessageType)
> primary key chirpid;
> create index usrSinceIx on GleambookUsers(user_since);
> create index sndTimeIx on ChirpMessages(send_time);
> create index authorIdIx on GleambookMessages(author_id);
> {noformat}
> Query:
> {noformat}
> USE SocialNetworkData;
> EXPLAIN
> SELECT g.message_id
> FROM GleambookUsers as u, GleambookMessages as g
> WHERE u.id/*+indexnl*/ = g.author_id 
> AND u.user_since = datetime("2013-04-16T09:45:46")
> {noformat}
> Plan:
> {noformat}
> distribute result [$$28]
> -- DISTRIBUTE_RESULT  |PARTITIONED|
>   exchange
>   -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
> union ($$54, $$55, $$28)
> -- UNION_ALL  |PARTITIONED|
>   exchange
>   -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
> project ([$$54])
> -- STREAM_PROJECT  |PARTITIONED|
>   assign [$$54] <- [{"message_id": $$52}]
>   -- ASSIGN  |PARTITIONED|
> project ([$$52])
> -- STREAM_PROJECT  |PARTITIONED|
>   select (eq($$29, $$53.getField(1)))
>   -- STREAM_SELECT  |PARTITIONED|
> project ([$$29, $$52, $$53])
> -- STREAM_PROJECT  |PARTITIONED|
>   exchange
>   -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
> unnest-map [$$52, $$53] <- 
> index-search("GleambookMessages", 0, "SocialNetworkData", 
> "GleambookMessages", TRUE, FALSE, 1, $$46, 1, $$46, TRUE, TRUE, TRUE)
> -- BTREE_SEARCH  |PARTITIONED|
>   exchange
>   -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
> project ([$$29, $$46])
> -- STREAM_PROJECT  |PARTITIONED|
>   exchange
>   -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
> split ($$47)
> -- SPLIT  |PARTITIONED|
>   exchange
>   -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
> project ([$$29, $$46, $$47])
> -- STREAM_PROJECT  |PARTITIONED|
>   exchange
>   -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
> unnest-map [$$45, $$46, $$47] <- 
> index-search("authorIdIx", 0, "SocialNetworkData", "GleambookMessages", TRUE, 
> TRUE, 1, $$29, 1, $$29, TRUE, TRUE, TRUE)
> -- BTREE_SEARCH  |PARTITIONED|
>   exchange
>   -- BROADCAST_EXCHANGE  |PARTITIONED|
> union ($$43, $$38, $$29)
> -- UNION_ALL  |PARTITIONED|
>   exchange
>   -- ONE_TO_ONE_EXCHANGE  
> |PARTITIONED|
> project ([$$43])
> -- STREAM_PROJECT  |PARTITIONED|
>   select (eq($$33, datetime: { 
> 2013-04-16T09:45:46.000Z }))
>   -- STREAM_SELECT  |PARTITIONED|
> project ([$$43, $$33])
> -- STREAM_PROJECT  
> |PARTITIONED|
>   assign [$$33] <- 
> [$$44.getField(1)]
>   -- ASSIGN  |PARTITIONED|
> exc

[jira] [Commented] (ASTERIXDB-2331) Plan branch repeated

2018-03-14 Thread Taewoo Kim (JIRA)

[ 
https://issues.apache.org/jira/browse/ASTERIXDB-2331?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16399565#comment-16399565
 ] 

Taewoo Kim commented on ASTERIXDB-2331:
---

This query consists of two index-only plan sub-queries. What a complex query it 
is. :)

 

1) Outer branch:

SELECT u.id from GleambookUsers as u WHERE u.user_since = 
datetime("2013-04-16T09:45:46");

 

2) Inner branch:

SELECT g.message_id FROM GleambookMessages as g WHERE XXX /*+indexnl*/ = 
g.author_id;

 

As [~luochen01] confirmed, the outer branch shows two paths after SPLIT (the 
first one - left path to primary index look-up for those tuples that 
instantTryLock were failed during the secondary index-search, the second one - 
nothing is needed). And this plan is fed into the second index-only plan path. 
This is a correct plan. 

 

 

 

> Plan branch repeated
> 
>
> Key: ASTERIXDB-2331
> URL: https://issues.apache.org/jira/browse/ASTERIXDB-2331
> Project: Apache AsterixDB
>  Issue Type: Bug
>  Components: COMP - Compiler
>Reporter: Wail Alkowaileet
>Assignee: Taewoo Kim
>Priority: Major
>
> I didn't investigate. But it looks like unmaintained Split output.
> DDL
> {noformat}
> DROP DATAVERSE SocialNetworkData IF EXISTS;
> CREATE DATAVERSE SocialNetworkData;
> USE SocialNetworkData;
> create type ChirpMessageType as {
> chirpid: int64,
> send_time: datetime
> };
> create type GleambookUserType as {
> id: int64,
> user_since: datetime
> };
> create type GleambookMessageType as {
> message_id: int64,
> author_id: int64,
> send_time: datetime
> };
> create dataset GleambookMessages(GleambookMessageType)
> primary key message_id;
> create dataset GleambookUsers(GleambookUserType)
> primary key id;
> create dataset ChirpMessages(ChirpMessageType)
> primary key chirpid;
> create index usrSinceIx on GleambookUsers(user_since);
> create index sndTimeIx on ChirpMessages(send_time);
> create index authorIdIx on GleambookMessages(author_id);
> {noformat}
> Query:
> {noformat}
> USE SocialNetworkData;
> EXPLAIN
> SELECT g.message_id
> FROM GleambookUsers as u, GleambookMessages as g
> WHERE u.id/*+indexnl*/ = g.author_id 
> AND u.user_since = datetime("2013-04-16T09:45:46")
> {noformat}
> Plan:
> {noformat}
> distribute result [$$28]
> -- DISTRIBUTE_RESULT  |PARTITIONED|
>   exchange
>   -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
> union ($$54, $$55, $$28)
> -- UNION_ALL  |PARTITIONED|
>   exchange
>   -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
> project ([$$54])
> -- STREAM_PROJECT  |PARTITIONED|
>   assign [$$54] <- [{"message_id": $$52}]
>   -- ASSIGN  |PARTITIONED|
> project ([$$52])
> -- STREAM_PROJECT  |PARTITIONED|
>   select (eq($$29, $$53.getField(1)))
>   -- STREAM_SELECT  |PARTITIONED|
> project ([$$29, $$52, $$53])
> -- STREAM_PROJECT  |PARTITIONED|
>   exchange
>   -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
> unnest-map [$$52, $$53] <- 
> index-search("GleambookMessages", 0, "SocialNetworkData", 
> "GleambookMessages", TRUE, FALSE, 1, $$46, 1, $$46, TRUE, TRUE, TRUE)
> -- BTREE_SEARCH  |PARTITIONED|
>   exchange
>   -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
> project ([$$29, $$46])
> -- STREAM_PROJECT  |PARTITIONED|
>   exchange
>   -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
> split ($$47)
> -- SPLIT  |PARTITIONED|
>   exchange
>   -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
> project ([$$29, $$46, $$47])
> -- STREAM_PROJECT  |PARTITIONED|
>   exchange
>   -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
> unnest-map [$$45, $$46, $$47] <- 
> index-search("authorIdIx", 0, "SocialNetworkData", "GleambookMessages", TRUE, 
> TRUE, 1, $$29, 1, $$29, TRUE, TRUE, TRUE)
> -- BTREE_SEARCH  |PARTITIONED|
>   exchange
>   -- BROADCAST_EXCHANGE  |PARTITIONED|
> union ($$43, $$38, $$29)
> -- UNION_ALL  |PARTITIONED|
>   exchange
>   -- ONE_TO_ONE_EXCHANGE  
> |PARTITIONED|
> project ([$$43])
> -- STRE

[jira] [Commented] (ASTERIXDB-2331) Plan branch repeated

2018-03-14 Thread Till (JIRA)

[ 
https://issues.apache.org/jira/browse/ASTERIXDB-2331?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16399559#comment-16399559
 ] 

Till commented on ASTERIXDB-2331:
-

[~wangsaeu] Can you confirm?

> Plan branch repeated
> 
>
> Key: ASTERIXDB-2331
> URL: https://issues.apache.org/jira/browse/ASTERIXDB-2331
> Project: Apache AsterixDB
>  Issue Type: Bug
>  Components: COMP - Compiler
>Reporter: Wail Alkowaileet
>Assignee: Taewoo Kim
>Priority: Major
>
> I didn't investigate. But it looks like unmaintained Split output.
> DDL
> {noformat}
> DROP DATAVERSE SocialNetworkData IF EXISTS;
> CREATE DATAVERSE SocialNetworkData;
> USE SocialNetworkData;
> create type ChirpMessageType as {
> chirpid: int64,
> send_time: datetime
> };
> create type GleambookUserType as {
> id: int64,
> user_since: datetime
> };
> create type GleambookMessageType as {
> message_id: int64,
> author_id: int64,
> send_time: datetime
> };
> create dataset GleambookMessages(GleambookMessageType)
> primary key message_id;
> create dataset GleambookUsers(GleambookUserType)
> primary key id;
> create dataset ChirpMessages(ChirpMessageType)
> primary key chirpid;
> create index usrSinceIx on GleambookUsers(user_since);
> create index sndTimeIx on ChirpMessages(send_time);
> create index authorIdIx on GleambookMessages(author_id);
> {noformat}
> Query:
> {noformat}
> USE SocialNetworkData;
> EXPLAIN
> SELECT g.message_id
> FROM GleambookUsers as u, GleambookMessages as g
> WHERE u.id/*+indexnl*/ = g.author_id 
> AND u.user_since = datetime("2013-04-16T09:45:46")
> {noformat}
> Plan:
> {noformat}
> distribute result [$$28]
> -- DISTRIBUTE_RESULT  |PARTITIONED|
>   exchange
>   -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
> union ($$54, $$55, $$28)
> -- UNION_ALL  |PARTITIONED|
>   exchange
>   -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
> project ([$$54])
> -- STREAM_PROJECT  |PARTITIONED|
>   assign [$$54] <- [{"message_id": $$52}]
>   -- ASSIGN  |PARTITIONED|
> project ([$$52])
> -- STREAM_PROJECT  |PARTITIONED|
>   select (eq($$29, $$53.getField(1)))
>   -- STREAM_SELECT  |PARTITIONED|
> project ([$$29, $$52, $$53])
> -- STREAM_PROJECT  |PARTITIONED|
>   exchange
>   -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
> unnest-map [$$52, $$53] <- 
> index-search("GleambookMessages", 0, "SocialNetworkData", 
> "GleambookMessages", TRUE, FALSE, 1, $$46, 1, $$46, TRUE, TRUE, TRUE)
> -- BTREE_SEARCH  |PARTITIONED|
>   exchange
>   -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
> project ([$$29, $$46])
> -- STREAM_PROJECT  |PARTITIONED|
>   exchange
>   -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
> split ($$47)
> -- SPLIT  |PARTITIONED|
>   exchange
>   -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
> project ([$$29, $$46, $$47])
> -- STREAM_PROJECT  |PARTITIONED|
>   exchange
>   -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
> unnest-map [$$45, $$46, $$47] <- 
> index-search("authorIdIx", 0, "SocialNetworkData", "GleambookMessages", TRUE, 
> TRUE, 1, $$29, 1, $$29, TRUE, TRUE, TRUE)
> -- BTREE_SEARCH  |PARTITIONED|
>   exchange
>   -- BROADCAST_EXCHANGE  |PARTITIONED|
> union ($$43, $$38, $$29)
> -- UNION_ALL  |PARTITIONED|
>   exchange
>   -- ONE_TO_ONE_EXCHANGE  
> |PARTITIONED|
> project ([$$43])
> -- STREAM_PROJECT  |PARTITIONED|
>   select (eq($$33, datetime: { 
> 2013-04-16T09:45:46.000Z }))
>   -- STREAM_SELECT  |PARTITIONED|
> project ([$$43, $$33])
> -- STREAM_PROJECT  
> |PARTITIONED|
>   assign [$$33] <- 
> [$$44.getField(1)]
>   -- ASSIGN  |PARTITIONED|
> exchange
>  

[jira] [Commented] (ASTERIXDB-2331) Plan branch repeated

2018-03-13 Thread Chen Luo (JIRA)

[ 
https://issues.apache.org/jira/browse/ASTERIXDB-2331?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16398060#comment-16398060
 ] 

Chen Luo commented on ASTERIXDB-2331:
-

I think this is the intended behavior of index-only plan, where results of 
secondary index search are divided into two branches based on the try lock 
results(one branch needs to perform do primary index lookup).

> Plan branch repeated
> 
>
> Key: ASTERIXDB-2331
> URL: https://issues.apache.org/jira/browse/ASTERIXDB-2331
> Project: Apache AsterixDB
>  Issue Type: Bug
>  Components: COMP - Compiler
>Reporter: Wail Alkowaileet
>Priority: Major
>
> I didn't investigate. But it looks like unmaintained Split output.
> DDL
> {noformat}
> DROP DATAVERSE SocialNetworkData IF EXISTS;
> CREATE DATAVERSE SocialNetworkData;
> USE SocialNetworkData;
> create type ChirpMessageType as {
> chirpid: int64,
> send_time: datetime
> };
> create type GleambookUserType as {
> id: int64,
> user_since: datetime
> };
> create type GleambookMessageType as {
> message_id: int64,
> author_id: int64,
> send_time: datetime
> };
> create dataset GleambookMessages(GleambookMessageType)
> primary key message_id;
> create dataset GleambookUsers(GleambookUserType)
> primary key id;
> create dataset ChirpMessages(ChirpMessageType)
> primary key chirpid;
> create index usrSinceIx on GleambookUsers(user_since);
> create index sndTimeIx on ChirpMessages(send_time);
> create index authorIdIx on GleambookMessages(author_id);
> {noformat}
> Query:
> {noformat}
> USE SocialNetworkData;
> EXPLAIN
> SELECT g.message_id
> FROM GleambookUsers as u, GleambookMessages as g
> WHERE u.id/*+indexnl*/ = g.author_id 
> AND u.user_since = datetime("2013-04-16T09:45:46")
> {noformat}
> Plan:
> {noformat}
> distribute result [$$28]
> -- DISTRIBUTE_RESULT  |PARTITIONED|
>   exchange
>   -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
> union ($$54, $$55, $$28)
> -- UNION_ALL  |PARTITIONED|
>   exchange
>   -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
> project ([$$54])
> -- STREAM_PROJECT  |PARTITIONED|
>   assign [$$54] <- [{"message_id": $$52}]
>   -- ASSIGN  |PARTITIONED|
> project ([$$52])
> -- STREAM_PROJECT  |PARTITIONED|
>   select (eq($$29, $$53.getField(1)))
>   -- STREAM_SELECT  |PARTITIONED|
> project ([$$29, $$52, $$53])
> -- STREAM_PROJECT  |PARTITIONED|
>   exchange
>   -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
> unnest-map [$$52, $$53] <- 
> index-search("GleambookMessages", 0, "SocialNetworkData", 
> "GleambookMessages", TRUE, FALSE, 1, $$46, 1, $$46, TRUE, TRUE, TRUE)
> -- BTREE_SEARCH  |PARTITIONED|
>   exchange
>   -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
> project ([$$29, $$46])
> -- STREAM_PROJECT  |PARTITIONED|
>   exchange
>   -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
> split ($$47)
> -- SPLIT  |PARTITIONED|
>   exchange
>   -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
> project ([$$29, $$46, $$47])
> -- STREAM_PROJECT  |PARTITIONED|
>   exchange
>   -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
> unnest-map [$$45, $$46, $$47] <- 
> index-search("authorIdIx", 0, "SocialNetworkData", "GleambookMessages", TRUE, 
> TRUE, 1, $$29, 1, $$29, TRUE, TRUE, TRUE)
> -- BTREE_SEARCH  |PARTITIONED|
>   exchange
>   -- BROADCAST_EXCHANGE  |PARTITIONED|
> union ($$43, $$38, $$29)
> -- UNION_ALL  |PARTITIONED|
>   exchange
>   -- ONE_TO_ONE_EXCHANGE  
> |PARTITIONED|
> project ([$$43])
> -- STREAM_PROJECT  |PARTITIONED|
>   select (eq($$33, datetime: { 
> 2013-04-16T09:45:46.000Z }))
>   -- STREAM_SELECT  |PARTITIONED|
> project ([$$43, $$33])
> -- STREAM_PROJECT  
> |PARTITIONED|
>   assign [$$33] <- 
> [$$44.getField(1)]
>   

[jira] [Commented] (ASTERIXDB-2331) Plan branch repeated

2018-03-13 Thread Wail Alkowaileet (JIRA)

[ 
https://issues.apache.org/jira/browse/ASTERIXDB-2331?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16398005#comment-16398005
 ] 

Wail Alkowaileet commented on ASTERIXDB-2331:
-

The issue disappeared after set noindexonly 'true';

> Plan branch repeated
> 
>
> Key: ASTERIXDB-2331
> URL: https://issues.apache.org/jira/browse/ASTERIXDB-2331
> Project: Apache AsterixDB
>  Issue Type: Bug
>  Components: COMP - Compiler
>Reporter: Wail Alkowaileet
>Priority: Major
>
> I didn't investigate. But it looks like unmaintained Split output.
> DDL
> {noformat}
> DROP DATAVERSE SocialNetworkData IF EXISTS;
> CREATE DATAVERSE SocialNetworkData;
> USE SocialNetworkData;
> create type ChirpMessageType as {
> chirpid: int64,
> send_time: datetime
> };
> create type GleambookUserType as {
> id: int64,
> user_since: datetime
> };
> create type GleambookMessageType as {
> message_id: int64,
> author_id: int64,
> send_time: datetime
> };
> create dataset GleambookMessages(GleambookMessageType)
> primary key message_id;
> create dataset GleambookUsers(GleambookUserType)
> primary key id;
> create dataset ChirpMessages(ChirpMessageType)
> primary key chirpid;
> create index usrSinceIx on GleambookUsers(user_since);
> create index sndTimeIx on ChirpMessages(send_time);
> create index authorIdIx on GleambookMessages(author_id);
> {noformat}
> Query:
> {noformat}
> USE SocialNetworkData;
> EXPLAIN
> SELECT g.message_id
> FROM GleambookUsers as u, GleambookMessages as g
> WHERE u.id/*+indexnl*/ = g.author_id 
> AND u.user_since = datetime("2013-04-16T09:45:46")
> {noformat}
> Plan:
> {noformat}
> distribute result [$$28]
> -- DISTRIBUTE_RESULT  |PARTITIONED|
>   exchange
>   -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
> union ($$54, $$55, $$28)
> -- UNION_ALL  |PARTITIONED|
>   exchange
>   -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
> project ([$$54])
> -- STREAM_PROJECT  |PARTITIONED|
>   assign [$$54] <- [{"message_id": $$52}]
>   -- ASSIGN  |PARTITIONED|
> project ([$$52])
> -- STREAM_PROJECT  |PARTITIONED|
>   select (eq($$29, $$53.getField(1)))
>   -- STREAM_SELECT  |PARTITIONED|
> project ([$$29, $$52, $$53])
> -- STREAM_PROJECT  |PARTITIONED|
>   exchange
>   -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
> unnest-map [$$52, $$53] <- 
> index-search("GleambookMessages", 0, "SocialNetworkData", 
> "GleambookMessages", TRUE, FALSE, 1, $$46, 1, $$46, TRUE, TRUE, TRUE)
> -- BTREE_SEARCH  |PARTITIONED|
>   exchange
>   -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
> project ([$$29, $$46])
> -- STREAM_PROJECT  |PARTITIONED|
>   exchange
>   -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
> split ($$47)
> -- SPLIT  |PARTITIONED|
>   exchange
>   -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
> project ([$$29, $$46, $$47])
> -- STREAM_PROJECT  |PARTITIONED|
>   exchange
>   -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
> unnest-map [$$45, $$46, $$47] <- 
> index-search("authorIdIx", 0, "SocialNetworkData", "GleambookMessages", TRUE, 
> TRUE, 1, $$29, 1, $$29, TRUE, TRUE, TRUE)
> -- BTREE_SEARCH  |PARTITIONED|
>   exchange
>   -- BROADCAST_EXCHANGE  |PARTITIONED|
> union ($$43, $$38, $$29)
> -- UNION_ALL  |PARTITIONED|
>   exchange
>   -- ONE_TO_ONE_EXCHANGE  
> |PARTITIONED|
> project ([$$43])
> -- STREAM_PROJECT  |PARTITIONED|
>   select (eq($$33, datetime: { 
> 2013-04-16T09:45:46.000Z }))
>   -- STREAM_SELECT  |PARTITIONED|
> project ([$$43, $$33])
> -- STREAM_PROJECT  
> |PARTITIONED|
>   assign [$$33] <- 
> [$$44.getField(1)]
>   -- ASSIGN  |PARTITIONED|
> exchange
>