[ 
https://issues.apache.org/jira/browse/CALCITE-6972?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18043617#comment-18043617
 ] 

Mihai Budiu commented on CALCITE-6972:
--------------------------------------

A way to get answers to these questions is to actually write a test which calls 
the unparse method. At a cursory glance I could not find one.

> SqlUpdate#unparse method omits processing of sourceSelect
> ---------------------------------------------------------
>
>                 Key: CALCITE-6972
>                 URL: https://issues.apache.org/jira/browse/CALCITE-6972
>             Project: Calcite
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 1.39.0
>            Reporter: Wei.Zhou
>            Priority: Major
>         Attachments: image-2025-04-20-08-32-42-029.png
>
>
> When i reading the code , i have some confusions about SqlUpdate class .
>  # Why is sourceSelect not be unparsed in the 'unparse' method  of 
> SqlUpdate,but in the constructor sourceSelect is one of the parameters? What 
> is the role of sourceSelect?
>  # Why setOperand method when parameter i eq 4 , the input operand assigned 
> to 
> sourceExpressionList but not sourceSelect?
>  # Why getOperandList return a list that not contains sourceSelect?
>  # As far as I understand, sourceSelect and sourceExpressionList should not 
> be set at the same time, right?
>  # In the constructor sourceExpressionList size must equals to 
> targetColumnList size and i how to create a SqlUpdate like
> UPDATE table AS alias SET column1 = ( SELECT column1 FROM table2 column1 = 
> 'column1Value' ) WHERE column1 = 'column1Value'?
> Especially the first 1, 2, and 3 questions seem to be bugs but i'm not sure 
> that. Can anyone  answer my confusions, thanks?
> !image-2025-04-20-08-32-42-029.png|width=330,height=316!



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to