[
https://issues.apache.org/jira/browse/FLINK-34459?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17818440#comment-17818440
]
Jeyhun Karimov edited comment on FLINK-34459 at 2/19/24 10:15 AM:
------------------------------------------------------------------
Hi [~martijnvisser] yes, there are some tradeoffs. Using AS is always a
solution, but then a user needs to modify a query [and maybe modify back].
And for queries with many projection expressions, user needs to remember the
mapping between EXPR$X -> actual expression in the query.
Some other systems like Spark does not truncate (at least for the large
expressions I tried), some like MySQL/SQLite truncate after some point (they
decide where and how to truncate for large expressions).
So, we have multiple options to deal with the very large expressions: fallback
to the current (EXPR$X) version, truncate, etc.
WDYT?
was (Author: jeyhunkarimov):
Hi [~martijnvisser] yes, there are some tradeoffs. Using AS is always a
solution, but then a user needs to modify a query [and maybe modify back].
And for queries with many projection expressions, user needs to remember the
mapping between EXPR$X -> actual expression in the query.
Some other vendors like Spark does not truncate (at least for the large
expressions I tried), some like MySQL/SQLite truncate after some point (they
decide where and how to truncate for large expressions).
So, we have multiple options to deal with the very large expressions: fallback
to the current (EXPR$X) version, truncate, etc.
WDYT?
> Results column names should match SELECT clause expression names
> ----------------------------------------------------------------
>
> Key: FLINK-34459
> URL: https://issues.apache.org/jira/browse/FLINK-34459
> Project: Flink
> Issue Type: Improvement
> Components: Table SQL / Client
> Affects Versions: 1.18.1
> Reporter: Jeyhun Karimov
> Priority: Minor
>
> When printing {{SQL SELECT}} results, Flink will output generated expression
> name when the expression is not {{column reference or used with alias/over.}}
> For example, select a, a + 1 from T would result in
> {code:java}
> +----+-------------+-------------+
> | op | a | EXPR$1 |
> +----+-------------+-------------+
> | +I | 1 | 2 |
> | +I | 1 | 2 |
> | +I | 1 | 2 |
> +----+-------------+-------------+
> {code}
> Instead of the generated {{EXPR$1}} it would be nice to have {{a + 1}} (which
> is the case in some other data processing systems like Spark).
--
This message was sent by Atlassian Jira
(v8.20.10#820010)