Wei.Zhou created CALCITE-6972:
---------------------------------

             Summary: 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
         Attachments: image-2025-04-20-08-32-42-029.png

When i reading the code , i have some confusions about SqlUdapte class .
 # Why is sourceSelect not be unparsed in the 'unparse' method  of 
SqlUdapte,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. Can anyone  help me 
solve them?

!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