[
https://issues.apache.org/jira/browse/CALCITE-7475?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18081093#comment-18081093
]
krooswu commented on CALCITE-7475:
----------------------------------
Hi Mihai,
Thank you for the quick fix. I sincerely apologize for the regression. I am
really sorry.
*Regarding the code:* You are absolutely right. Using {{writer.sep()}} in that
context was a significant oversight and an inappropriate use of the API. It is
a bug that I definitely should have caught during local testing. I will learn
from this mistake and ensure much stricter validation for {{unparse}} logic in
my future contributions to prevent any further stability issues.
*Regarding the Git authorship:* I've investigated this and suspect the metadata
was incorrectly preserved during a complex {{git rebase}} or {{cherry-pick}}
while I was resolving upstream conflicts. I'm still refining my Git workflow
for the project's standards. I will be much more diligent in checking {{git log
--format=fuller}} to ensure the authorship is correct before any future push.
I really appreciate your patience and for fixing this so quickly.
> Babel parser allows postfix access after PostgreSQL-style :: infix cast
> -----------------------------------------------------------------------
>
> Key: CALCITE-7475
> URL: https://issues.apache.org/jira/browse/CALCITE-7475
> Project: Calcite
> Issue Type: Improvement
> Components: babel
> Affects Versions: 1.41.0
> Reporter: Tamas Mate
> Assignee: krooswu
> Priority: Major
> Labels: pull-request-available
> Fix For: 1.42.0
>
>
> In the Babel parser, InfixCast currently continues with regular postfix
> parsing after expr "::" type.
> This means the parser accepts postfix forms around "::" that go beyond a
> plain infix cast.
> Existing tests already cover examples such as:
>
> {code:java}
> select v.field::integer,
> arr[1].field::varchar,
> v.field.field2::integer,
> v.field[2]::integer
> from t
> select v::varchar array[1].field from t
> select (v::varchar array)[1].field from t{code}
>
>
> The current behavior is subtle because parentheses change how the postfix is
> associated. The existing tests expect:
>
>
> {code:java}
> select v::varchar array[1].field from t{code}
> to unparse as
>
>
> {code:java}
> SELECT `V` :: (VARCHAR ARRAY[1].`FIELD`)
> FROM `T`{code}
> while
>
>
> {code:java}
> select (v::varchar array)[1].field from t{code}
> unparses as
>
>
> {code:java}
> SELECT (`V` :: VARCHAR ARRAY[1].`FIELD`)
> FROM `T`{code}
> This ticket is to decide whether postfix access after "::" should be
> supported in Babel at all, and if so, to document and test the intended
> precedence rules more explicitly.
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)