[
https://issues.apache.org/jira/browse/TAJO-1406?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14484535#comment-14484535
]
Keuntae Park commented on TAJO-1406:
------------------------------------
Sorry for late response, [~ykrips].
I mean the query rewriting as [~seungunchoe] described below
and resuting query would have inline view as you said.
But, I'm not sure that it is good approach for every cases
because it may induces multiple inline views of the same operation sometimes.
However, I thought it could be a simple and good start for handling with
clause.
> Support WITH clause without RECURSIVE
> -------------------------------------
>
> Key: TAJO-1406
> URL: https://issues.apache.org/jira/browse/TAJO-1406
> Project: Tajo
> Issue Type: New Feature
> Components: parser, planner/optimizer
> Reporter: Dongjoon Hyun
> Assignee: Seungun Choe
>
> WITH clause is widely used expression in SQL language, for e.g., TPC-DS Q1,
> Q2, Q4, Q5, Q11, Q14, Q23, Q24, Q30, Q31, Q33, Q39, Q47, Q51, Q54, Q56, Q57,
> Q58, Q59, Q60, Q64, Q74, Q75, Q77, Q78, Q80, Q81, Q83, Q95, Q97.
> Refer the following queries in
> http://www.postgresql.org/docs/9.4/static/queries-with.html.
> {code:sql}
> WITH regional_sales AS (
> SELECT region, SUM(amount) AS total_sales
> FROM orders
> GROUP BY region
> ), top_regions AS (
> SELECT region
> FROM regional_sales
> WHERE total_sales > (SELECT SUM(total_sales)/10 FROM regional_sales)
> )
> SELECT region,
> product,
> SUM(quantity) AS product_units,
> SUM(amount) AS product_sales
> FROM orders
> WHERE region IN (SELECT region FROM top_regions)
> GROUP BY region, product;
> {code}
> In this issue, WITH RECURSIVE does not support. It should be handled as a
> separate issue.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)