leoyvens commented on code in PR #10876: URL: https://github.com/apache/datafusion/pull/10876#discussion_r1638300933
########## datafusion/core/src/catalog/mod.rs: ########## @@ -295,6 +296,118 @@ impl CatalogProvider for MemoryCatalogProvider { } } +/// Resolve all table references in the SQL statement. +/// +/// ## Example +/// +/// ``` +/// use datafusion_sql::parser::DFParser; +/// use datafusion::catalog::resolve_table_references; +/// +/// let query = "SELECT a FROM foo where x IN (SELECT y FROM bar)"; +/// let statement = DFParser::parse_sql(query).unwrap().pop_back().unwrap(); +/// let table_refs = resolve_table_references(&statement, true).unwrap(); +/// assert_eq!(table_refs.len(), 2); +/// assert_eq!(table_refs[0].to_string(), "foo"); Review Comment: Nice catch, I've switched to a BTreeSet. -- 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