You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@asterixdb.apache.org by "Taewoo Kim (JIRA)" <ji...@apache.org> on 2016/11/11 01:43:58 UTC
[jira] [Resolved] (ASTERIXDB-1727) Adding grouping hint breaks the
query
[ https://issues.apache.org/jira/browse/ASTERIXDB-1727?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Taewoo Kim resolved ASTERIXDB-1727.
-----------------------------------
Resolution: Fixed
Hash hint will be ignored by the system (currently we can't support this based on the given plan - two aggregates in one group-by)
> Adding grouping hint breaks the query
> -------------------------------------
>
> Key: ASTERIXDB-1727
> URL: https://issues.apache.org/jira/browse/ASTERIXDB-1727
> Project: Apache AsterixDB
> Issue Type: Bug
> Reporter: Pouria
> Assignee: Taewoo Kim
>
> The following query works fine with no hint. Adding a hint to use hash-based group-by breaks it with the following error:
> {noformat}
> Variable $$43 could not be found in any input schema. [AlgebricksException]
> {noformat}
> Here is the query:
> {noformat}
> let $customer := {{ {"cid" : 1}, {"cid" : 2} }}
> let $orders := {{
> {"oid": 100,
> "ocid" : 1,
> "priority" : 10,
> "class" : "A",
> "items" : [{"price" : 1000}, { "price" : 2000}]
> },
> {"oid": 200,
> "ocid" : 2,
> "priority" : 20,
> "class" : "A",
> "items" : [{"price" : 2000}, {"price" : 3000}]
> }
> }}
> for $c in $customer
> for $o in $orders
> where
> $c.cid = $o.ocid
> for $i in $o.items
> /*+ hash*/
> group by $o_orderid := $o.oid, $o_class := $o.class, $o_priority := $o.priority
> with $i
> let $price := sum (
> for $t in $i
> return
> $t.price
> )
> order by $price desc, $o_class
> return {
> "o_orderkey": $o_orderid,
> "price": $price,
> "o_class": $o_class,
> "o_priority": $o_priority
> }
> {noformat}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)