asterixdb-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Taewoo Kim (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (ASTERIXDB-1779) Processing the certain function predicates after a simple predicates
Date Wed, 01 Feb 2017 19:11:52 GMT

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

Taewoo Kim commented on ASTERIXDB-1779:
---------------------------------------

More info: why the original orders are changed in the current code base: 

{code}
Feb 01, 2017 10:50:54 AM org.apache.hyracks.algebricks.core.rewriter.base.AbstractRuleController
printRuleApplication
FINE: >>>> Rule class org.apache.hyracks.algebricks.rewriter.rules.PushSelectDownRule
fired.
{code}

{code}
Feb 01, 2017 10:50:54 AM org.apache.hyracks.algebricks.core.rewriter.base.AbstractRuleController
printRuleApplication
FINE: >>>> Before plan
select (function-call: algebricks:gt, Args:[function-call: asterix:field-access-by-name, Args:[%0->$$3,
AString: {send-time}], %0->$$0]) -- |UNPARTITIONED|
  select (function-call: asterix:spatial-intersect, Args:[function-call: asterix:field-access-by-name,
Args:[function-call: asterix:field-access-by-name, Args:[%0->$$3, AString: {user}], AString:
{sender-location}], %0->$$1]) -- |UNPARTITIONED|
    select (function-call: asterix:contains, Args:[function-call: asterix:field-access-by-name,
Args:[%0->$$3, AString: {message-text}], %0->$$2]) -- |UNPARTITIONED|
      data-scan []<-[$$17, $$3] <- TinySocial:TweetMessages -- |UNPARTITIONED|
        assign [$$2] <- [AString: {verizon}] -- |UNPARTITIONED|
          assign [$$1] <- [ARectangle: { p1: APoint: { x: 0.0, y: 0.0 }, p2: APoint: {
x: 100.0, y: 100.0 }}] -- |UNPARTITIONED|
            assign [$$0] <- [ADateTime: { 2010-12-12T00:00:00.000Z }] -- |UNPARTITIONED|
              empty-tuple-source -- |UNPARTITIONED|
{code}


{code}
Feb 01, 2017 10:50:54 AM org.apache.hyracks.algebricks.core.rewriter.base.AbstractRuleController
printRuleApplication
FINE: >>>> After plan
select (function-call: asterix:spatial-intersect, Args:[function-call: asterix:field-access-by-name,
Args:[function-call: asterix:field-access-by-name, Args:[%0->$$3, AString: {user}], AString:
{sender-location}], %0->$$1]) -- |UNPARTITIONED|
  select (function-call: asterix:contains, Args:[function-call: asterix:field-access-by-name,
Args:[%0->$$3, AString: {message-text}], %0->$$2]) -- |UNPARTITIONED|
    select (function-call: algebricks:gt, Args:[function-call: asterix:field-access-by-name,
Args:[%0->$$3, AString: {send-time}], %0->$$0]) -- |UNPARTITIONED|
      data-scan []<-[$$17, $$3] <- TinySocial:TweetMessages -- |UNPARTITIONED|
        assign [$$2] <- [AString: {verizon}] -- |UNPARTITIONED|
          assign [$$1] <- [ARectangle: { p1: APoint: { x: 0.0, y: 0.0 }, p2: APoint: {
x: 100.0, y: 100.0 }}] -- |UNPARTITIONED|
            assign [$$0] <- [ADateTime: { 2010-12-12T00:00:00.000Z }] -- |UNPARTITIONED|
              empty-tuple-source -- |UNPARTITIONED|
{code}


> Processing the certain function predicates after a simple predicates
> --------------------------------------------------------------------
>
>                 Key: ASTERIXDB-1779
>                 URL: https://issues.apache.org/jira/browse/ASTERIXDB-1779
>             Project: Apache AsterixDB
>          Issue Type: Improvement
>            Reporter: Taewoo Kim
>            Assignee: Taewoo Kim
>
> For example, if we have the following AQL query,
> {code}
> for $i in dataset MyData
>    where $i.id < 5 and edit-distance($i.name, "Arnold") < 2
>    return $i;
> {code}
> It may be better to process *$i.id < 5* predicate first and then process *edit-distance($i.name,
"Arnold")* predicate since the processing cost of the latter is higher than that of the former.
 



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Mime
View raw message