Skip to content

Commit 9f6f8e3

Browse files
committed
apply suggestions
1 parent 8494ce8 commit 9f6f8e3

File tree

3 files changed

+4
-5
lines changed

3 files changed

+4
-5
lines changed

src/ast/query.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1626,6 +1626,7 @@ pub struct TableAliasColumnDef {
16261626
}
16271627

16281628
impl TableAliasColumnDef {
1629+
/// Create a new table alias column definition with only a name and no type
16291630
pub fn from_column_name(name: &str) -> Self {
16301631
TableAliasColumnDef {
16311632
name: Ident::new(name),

src/parser/mod.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8607,10 +8607,8 @@ impl<'a> Parser<'a> {
86078607
}
86088608
}
86098609

8610-
/// Parse a parenthesized comma-separated list of unqualified, possibly quoted identifiers
8611-
pub fn parse_table_alias_column_defs(
8612-
&mut self,
8613-
) -> Result<Vec<TableAliasColumnDef>, ParserError> {
8610+
/// Parse a parenthesized comma-separated list of table alias column definitions.
8611+
fn parse_table_alias_column_defs(&mut self) -> Result<Vec<TableAliasColumnDef>, ParserError> {
86148612
if self.consume_token(&Token::LParen) {
86158613
let cols = self.parse_comma_separated(|p| {
86168614
let name = p.parse_identifier(false)?;

tests/sqlparser_common.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5581,7 +5581,7 @@ fn parse_table_function() {
55815581
}
55825582

55835583
#[test]
5584-
fn parse_table_valued_function_with_alias_and_column_defs() {
5584+
fn parse_select_with_alias_and_column_defs() {
55855585
let sql = r#"SELECT * FROM jsonb_to_record('{"a": "x", "b": 2}'::JSONB) AS x (a TEXT, b INT)"#;
55865586
let select = verified_only_select(sql);
55875587

0 commit comments

Comments
 (0)