You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(query): AsyncFunctionCall::display_name should respect quota (#18412)
During the semantic analysis phase of the `nextval` function, the logic for generating `display_name` might not have fully considered SQL identifier quoting rules.
If the sequence name was a reserved keyword or contained special characters, the generated `display_name` might not conform to SQL syntax, leading to inaccurate display or potential issues.
This change constructs the `display_name` by leveraging the `to_string()` method of the `ident` object returned by `normalize_identifier`.
The `ident.to_string()` method already incorporates the logic for necessary identifier quoting according to SQL rules.
In main:
```
root@localhost:8000/default/default> create or replace table mytest (seq int default nextval(`ๆต่ฏ`));
error: APIError: QueryFailed: [1001]fail to parse default expr `CAST(nextval(ๆต่ฏ) AS Int32 NULL)` (string length = 35) of field seq, SyntaxException. Code: 1005, Text = unable to recognize the rest tokens.
```
0 commit comments