You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@asterixdb.apache.org by "Wail Alkowaileet (JIRA)" <ji...@apache.org> on 2017/12/08 06:50:00 UTC
[jira] [Created] (ASTERIXDB-2191) Constant folding for nested
Scalar Functions
Wail Alkowaileet created ASTERIXDB-2191:
-------------------------------------------
Summary: Constant folding for nested Scalar Functions
Key: ASTERIXDB-2191
URL: https://issues.apache.org/jira/browse/ASTERIXDB-2191
Project: Apache AsterixDB
Issue Type: Improvement
Components: COMP - Compiler
Reporter: Wail Alkowaileet
Assignee: Wail Alkowaileet
Currently, ConstantFoldingRule ignores functions that have non-constants as their arguments. That can miss some opportunities as below:
* Query:
{noformat}
SELECT t
FROM Tweets as t
WHERE t.x = t.x;
{noformat}
* Plan
{noformat}
distribute result [$$7]
-- DISTRIBUTE_RESULT |PARTITIONED|
exchange
-- ONE_TO_ONE_EXCHANGE |PARTITIONED|
project ([$$7])
-- STREAM_PROJECT |PARTITIONED|
assign [$$7] <- [{"t": $$t}]
-- ASSIGN |PARTITIONED|
project ([$$t])
-- STREAM_PROJECT |PARTITIONED|
select (eq($$8, $$8))
-- STREAM_SELECT |PARTITIONED|
assign [$$8] <- [$$t.getField("x")]
-- ASSIGN |PARTITIONED|
project ([$$t])
-- STREAM_PROJECT |PARTITIONED|
exchange
-- ONE_TO_ONE_EXCHANGE |PARTITIONED|
data-scan []<-[$$9, $$t] <- TwitterDataverse.Tweets
-- DATASOURCE_SCAN |PARTITIONED|
exchange
-- ONE_TO_ONE_EXCHANGE |PARTITIONED|
empty-tuple-source
-- EMPTY_TUPLE_SOURCE |PARTITIONED|
{noformat}
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)