[jira] [Commented] (ASTERIXDB-1531) Order by bug for composite order keys and nested fields
[ https://issues.apache.org/jira/browse/ASTERIXDB-1531?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15398225#comment-15398225 ] ASF subversion and git services commented on ASTERIXDB-1531: Commit af8255b8a33847e2309567d4a6f0482a565662d9 in asterixdb's branch refs/heads/master from [~buyingyi] [ https://git-wip-us.apache.org/repos/asf?p=asterixdb.git;h=af8255b ] ASTERIXDB-1531: fix ORDER BY with primary keys as non-prefix sort keys. - clean up the local property inference implemenation; - avoid side-effects for data properties during property matching. Change-Id: Iee7fcdd6eb1279e8ee14ba75ee31ac118b00c806 Reviewed-on: https://asterix-gerrit.ics.uci.edu/1022 Tested-by: JenkinsIntegration-Tests: Jenkins Reviewed-by: Yingyi Bu > Order by bug for composite order keys and nested fields > --- > > Key: ASTERIXDB-1531 > URL: https://issues.apache.org/jira/browse/ASTERIXDB-1531 > Project: Apache AsterixDB > Issue Type: Bug > Components: AsterixDB, Translator - AQL > Environment: 101-like demo (modified TinySocial) on current/latest > binary bits for Mac >Reporter: Michael J. Carey >Assignee: Yingyi Bu >Priority: Critical > Attachments: tinysocialnew.zip > > > use dataverse TinySocial; // okay, a name-modified version thereof > from $cm in dataset ChirpMessages > order by $cm.user.screen-name, $cm.chirpid > select $cm; > ---> This just orders by chirpid. (You can repro by doing the same thing > with the current TinySocial data using the non-renamed stuff - so I won't > attach all the repro stuff here unless you want me too, in which case I can.) -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (ASTERIXDB-1531) Order by bug for composite order keys and nested fields
[ https://issues.apache.org/jira/browse/ASTERIXDB-1531?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15378960#comment-15378960 ] Yingyi Bu commented on ASTERIXDB-1531: -- Got it. I can reproduce that now. It is a bug in data property handling -- the optimizer thinks the data is ordered by chirpId and thus it doesn't need to sort again. Here is the optimized plan: {noformat} distribute result [%0->$$0] -- DISTRIBUTE_RESULT |PARTITIONED| exchange -- ONE_TO_ONE_EXCHANGE |PARTITIONED| project ([$$0]) -- STREAM_PROJECT |PARTITIONED| exchange -- SORT_MERGE_EXCHANGE [$$5(ASC) ] |PARTITIONED| project ([$$0, $$5]) -- STREAM_PROJECT |PARTITIONED| assign [$$6] <- [function-call: asterix:field-access-by-name, Args:[function-call: asterix:field-access-by-name, Args:[%0->$$0, AString: {user}], AString: {screenName}]] -- ASSIGN |PARTITIONED| exchange -- ONE_TO_ONE_EXCHANGE |PARTITIONED| data-scan []<-[$$5, $$0] <- test:ChirpMessages -- DATASOURCE_SCAN |PARTITIONED| exchange -- ONE_TO_ONE_EXCHANGE |PARTITIONED| empty-tuple-source -- EMPTY_TUPLE_SOURCE |PARTITIONED| {noformat} > Order by bug for composite order keys and nested fields > --- > > Key: ASTERIXDB-1531 > URL: https://issues.apache.org/jira/browse/ASTERIXDB-1531 > Project: Apache AsterixDB > Issue Type: Bug > Components: AsterixDB, Translator - AQL > Environment: 101-like demo (modified TinySocial) on current/latest > binary bits for Mac >Reporter: Michael J. Carey >Assignee: Yingyi Bu > Attachments: tinysocialnew.zip > > > use dataverse TinySocial; // okay, a name-modified version thereof > from $cm in dataset ChirpMessages > order by $cm.user.screen-name, $cm.chirpid > select $cm; > ---> This just orders by chirpid. (You can repro by doing the same thing > with the current TinySocial data using the non-renamed stuff - so I won't > attach all the repro stuff here unless you want me too, in which case I can.) -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (ASTERIXDB-1531) Order by bug for composite order keys and nested fields
[ https://issues.apache.org/jira/browse/ASTERIXDB-1531?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15378900#comment-15378900 ] Michael J. Carey commented on ASTERIXDB-1531: - Sorry, my repro dataset was different than the filed query bug's state of the world. Here's a buggy query (I think) that shows the problem (if I'm not mistaken) on the attached data. Note that I also retrieve the field values so you can see it's not a missing info problem. use dataverse TinySocial; from $cm in dataset ChirpMessages order by $cm.user.screenName, $cm.chirpId select {"name":$cm.user.screenName, "id":$cm.chirpId}; > Order by bug for composite order keys and nested fields > --- > > Key: ASTERIXDB-1531 > URL: https://issues.apache.org/jira/browse/ASTERIXDB-1531 > Project: Apache AsterixDB > Issue Type: Bug > Components: AsterixDB, Translator - AQL > Environment: 101-like demo (modified TinySocial) on current/latest > binary bits for Mac >Reporter: Michael J. Carey >Assignee: Yingyi Bu > Attachments: tinysocialnew.zip > > > use dataverse TinySocial; // okay, a name-modified version thereof > from $cm in dataset ChirpMessages > order by $cm.user.screen-name, $cm.chirpid > select $cm; > ---> This just orders by chirpid. (You can repro by doing the same thing > with the current TinySocial data using the non-renamed stuff - so I won't > attach all the repro stuff here unless you want me too, in which case I can.) -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (ASTERIXDB-1531) Order by bug for composite order keys and nested fields
[ https://issues.apache.org/jira/browse/ASTERIXDB-1531?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15378676#comment-15378676 ] Yingyi Bu commented on ASTERIXDB-1531: -- After looking at the data, I realized that you have to change "screen-name" to "screenName": from $cm in dataset ChirpMessages order by $cm.user.screenName, $cm.chirpid select $cm; Otherwise, the data is ordered by MISSING first (as $cm.user.screen-name evaluates to MISSING in the data) and then $cm.chirpid :-) > Order by bug for composite order keys and nested fields > --- > > Key: ASTERIXDB-1531 > URL: https://issues.apache.org/jira/browse/ASTERIXDB-1531 > Project: Apache AsterixDB > Issue Type: Bug > Components: AsterixDB, Translator - AQL > Environment: 101-like demo (modified TinySocial) on current/latest > binary bits for Mac >Reporter: Michael J. Carey >Assignee: Yingyi Bu > Attachments: tinysocialnew.zip > > > use dataverse TinySocial; // okay, a name-modified version thereof > from $cm in dataset ChirpMessages > order by $cm.user.screen-name, $cm.chirpid > select $cm; > ---> This just orders by chirpid. (You can repro by doing the same thing > with the current TinySocial data using the non-renamed stuff - so I won't > attach all the repro stuff here unless you want me too, in which case I can.) -- This message was sent by Atlassian JIRA (v6.3.4#6332)