You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ShardingSphere parser engine helps users parse a SQL to get the AST (Abstract Syntax Tree) and visit this tree to get SQLStatement (Java Object). Currently, we are planning to enhance the support for Oracle SQL parsing in ShardingSphere.
CREATE MATERIALIZED VIEW mv3
ENABLE QUERY REWRITE ASSELECT prod_name, TO_CHAR(sales.time_id,'yyyy-mm')
AS month, SUM(amount_sold) AS sum_sales
FROM sales, products WHEREsales.prod_id=products.prod_idGROUP BY prod_name, TO_CHAR(sales_time_id, 'yyyy-mm');
CREATE MATERIALIZED VIEW popular_promo_sales_mv
BUILD IMMEDIATE
REFRESH FORCE
ENABLE QUERY REWRITE ASSELECTp.promo_name, SUM(s.amount_sold) AS sum_amount_sold
FROM promotions p, sales s
WHEREs.promo_id=p.promo_idANDp.promo_nameIN ('coupon', 'premium', 'giveaway')
GROUP BY promo_name;
CREATE MATERIALIZED VIEW mv_prod_time
REFRESH COMPLETE ON DEMAND ASSELECT
(CASE
WHEN ((GROUPING(calendar_year)=0 )
AND (GROUPING(calendar_quarter_desc)=1 ))
THEN (TO_CHAR(calendar_year) ||'_0')
WHEN ((GROUPING(calendar_quarter_desc)=0 )
AND (GROUPING(calendar_month_desc)=1 ))
THEN (TO_CHAR(calendar_quarter_desc) ||'_1')
WHEN ((GROUPING(calendar_month_desc)=0 )
AND (GROUPING(t.time_id)=1 ))
THEN (TO_CHAR(calendar_month_desc) ||'_2')
ELSE (TO_CHAR(t.time_id) ||'_3')
END) Hierarchical_Time,
calendar_year year, calendar_quarter_desc quarter,
calendar_month_desc month, t.time_id day,
prod_category cat, prod_subcategory subcat, p.prod_id prod,
GROUPING_ID(prod_category, prod_subcategory, p.prod_id,
calendar_year, calendar_quarter_desc, calendar_month_desc,t.time_id) gid,
GROUPING_ID(prod_category, prod_subcategory, p.prod_id) gid_p,
GROUPING_ID(calendar_year, calendar_quarter_desc,
calendar_month_desc, t.time_id) gid_t,
SUM(amount_sold) s_sold, COUNT(amount_sold) c_sold, COUNT(*) cnt
FROM SALES s, TIMES t, PRODUCTS p
WHEREs.time_id=t.time_idANDp.prod_nameIN ('Bounce', 'Y Box') ANDs.prod_id=p.prod_idGROUP BY
ROLLUP(calendar_year, calendar_quarter_desc, calendar_month_desc, t.time_id),
ROLLUP(prod_category, prod_subcategory, p.prod_id);
Background
Hi community,
This issue is for #26878.
ShardingSphere parser engine helps users parse a SQL to get the AST (Abstract Syntax Tree) and visit this tree to get SQLStatement (Java Object). Currently, we are planning to enhance the support for Oracle SQL parsing in ShardingSphere.
More details:
https://shardingsphere.apache.org/document/current/en/reference/sharding/parse/
Task
This issue is to support more oracle sql parse, as follows:
Process
Relevant Skills
g4
fileThe text was updated successfully, but these errors were encountered: