xuzifu666 commented on code in PR #4939:
URL: https://github.com/apache/calcite/pull/4939#discussion_r3238664646


##########
site/_docs/reference.md:
##########
@@ -244,9 +244,14 @@ starWithExclude:
       *
   |   * EXCLUDE '(' column [, column ]* ')'
 
+starWithReplace:
+      *
+  |   * REPLACE '(' expression AS column [, expression AS column ]* ')'
+
 Note:
 
 * `SELECT * EXCLUDE (...)` is recognized only when the Babel parser is 
enabled. It sets the generated parser configuration flag `includeStarExclude` 
to `true` (the standard parser leaves that flag `false`), which allows a `STAR` 
token followed by `EXCLUDE` (or the alias `EXCEPT`) and a parenthesized 
identifier list to be parsed into a `SqlStarExclude` node and ensures 
validators respect the exclusion list when expanding the projection. Reusing 
the same parser configuration elsewhere enables the same syntax for other 
components that need it.
+* `SELECT * REPLACE (...)` is recognized only when the Babel parser is 
enabled. It sets the generated parser configuration flag `includeStarReplace` 
to `true` (the standard parser leaves that flag `false`), which allows a `STAR` 
token followed by `REPLACE` and a parenthesized list of `expression AS column` 
pairs to be parsed into a `SqlStarReplace` node and ensures validators 
substitute the specified expressions for the matching columns when expanding 
the projection. The column alias must either be a simple identifier or, for a 
table-qualified star such as `t.*`, a qualified identifier whose prefix matches 
the star's table alias. Reusing the same parser configuration elsewhere enables 
the same syntax for other components that need it.

Review Comment:
   I did some changes here to make it more clear.



-- 
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]

Reply via email to