terrymanu commented on PR #39093: URL: https://github.com/apache/shardingsphere/pull/39093#issuecomment-5462458493
This issue still exists. The latest change fixes one case but breaks the mirrored case: `UPDATE [@MyTable] SET Remark = 'x' FROM @MyTable AS [@MyTable];` Here, the UPDATE target `[@MyTable]` exactly matches the FROM alias `[@MyTable]`, so the target should resolve to that alias, which points to the table variable `@MyTable`. Please adjust `isAliasInFromClause` to determine alias matching by comparing the UPDATE target with the FROM alias, including their quoting. It should not require the UPDATE target and the original table in the FROM clause to have the same table-variable classification. These two cases should produce different results: - `UPDATE [@MyTable] ... FROM @MyTable AS [@MyTable]`: the target is the FROM alias. - `UPDATE @MyTable ... FROM [@MyTable] AS [@MyTable]`: the target is not the quoted alias. Please also update the related test cases: - `target-table-is-from-alias` should be `true` for the first case. - In the Encrypt rewrite result, columns belonging to the table variable should not be rewritten to cipher columns. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
