byte-sourcerer commented on code in PR #1633: URL: https://github.com/apache/datafusion-sqlparser-rs/pull/1633#discussion_r1907194705
########## src/parser/mod.rs: ########## @@ -8857,6 +8857,23 @@ impl<'a> Parser<'a> { } } + pub fn parse_table_object( + &mut self, + in_table_clause: bool, + ) -> Result<TableObject, ParserError> { + if dialect_of!(self is ClickHouseDialect) && self.parse_keyword(Keyword::FUNCTION) { + self.parse_table_function().map(TableObject::TableFunction) + } else { + self.parse_object_name(in_table_clause) + .map(TableObject::TableName) + } + } + + pub fn parse_table_function(&mut self) -> Result<Function, ParserError> { + let fn_name = self.parse_object_name(false)?; + self.parse_function_call(fn_name) + } Review Comment: Removed. ########## tests/sqlparser_clickhouse.rs: ########## @@ -222,6 +222,11 @@ fn parse_create_table() { ); } +#[test] +fn parse_insert_into_function() { + clickhouse().verified_stmt(r#"INSERT INTO TABLE FUNCTION remote('localhost', default.simple_table) VALUES (100, 'inserted via remote()')"#); Review Comment: Added. -- 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: github-unsubscr...@datafusion.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org For additional commands, e-mail: github-h...@datafusion.apache.org