chore: fix typo (#822)

This commit is contained in:
Y Togami 2023-03-03 00:32:20 +09:00 committed by GitHub
parent b838415276
commit 2285bb44ba
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 7 deletions

View file

@ -563,16 +563,16 @@ impl fmt::Display for ReplaceSelectItem {
#[cfg_attr(feature = "visitor", derive(Visit, VisitMut))]
pub struct ReplaceSelectElement {
pub expr: Expr,
pub colum_name: Ident,
pub column_name: Ident,
pub as_keyword: bool,
}
impl fmt::Display for ReplaceSelectElement {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
if self.as_keyword {
write!(f, "{} AS {}", self.expr, self.colum_name)
write!(f, "{} AS {}", self.expr, self.column_name)
} else {
write!(f, "{} {}", self.expr, self.colum_name)
write!(f, "{} {}", self.expr, self.column_name)
}
}
}

View file

@ -6277,7 +6277,7 @@ impl<'a> Parser<'a> {
let ident = self.parse_identifier()?;
Ok(ReplaceSelectElement {
expr,
colum_name: ident,
column_name: ident,
as_keyword,
})
}