You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@calcite.apache.org by "yanjing.wang (Jira)" <ji...@apache.org> on 2021/08/17 07:29:00 UTC
[jira] [Created] (CALCITE-4740) Converting rel to sql with big
query dialect results incorrect having clause
yanjing.wang created CALCITE-4740:
-------------------------------------
Summary: Converting rel to sql with big query dialect results incorrect having clause
Key: CALCITE-4740
URL: https://issues.apache.org/jira/browse/CALCITE-4740
Project: Calcite
Issue Type: Bug
Components: core
Affects Versions: 1.27.0
Environment: jdk8
macos
Reporter: yanjing.wang
I'm convertingĀ
{code:java}
String query = select
"product_id" , sum("shelf_width")
from "foodmart"."product"
where "product_id" > 0
group by "product_id" having sum("shelf_width") > 1{code}
with big query dialect, but results
{code:java}
SELECT product_id, SUM(shelf_width)
FROM foodmart.product
WHERE product_id > 0
GROUP BY product_id
HAVING `EXPR$1` > 1
{code}
Maybe we need replace having clause aliases when stripping trivial aliases.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)