mirror of
https://github.com/apache/datafusion-sqlparser-rs.git
synced 2025-09-06 22:20:31 +00:00
Use named fields in ExpressionWithAlias instead of a tuple
(This produces more natural JSON representation when serializing AST with serde.)
This commit is contained in:
parent
4a5dc8dd4b
commit
085e8a6b04
3 changed files with 7 additions and 7 deletions
|
@ -1660,7 +1660,7 @@ impl Parser {
|
|||
if let Some(alias) =
|
||||
self.parse_optional_alias(keywords::RESERVED_FOR_COLUMN_ALIAS)?
|
||||
{
|
||||
projections.push(SQLSelectItem::ExpressionWithAlias(expr, alias));
|
||||
projections.push(SQLSelectItem::ExpressionWithAlias { expr, alias });
|
||||
} else {
|
||||
projections.push(SQLSelectItem::UnnamedExpression(expr));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue