LiaCastaneda commented on code in PR #16742: URL: https://github.com/apache/datafusion/pull/16742#discussion_r2199941659
########## datafusion/proto/tests/cases/roundtrip_physical_plan.rs: ########## @@ -1780,3 +1780,111 @@ async fn test_tpch_part_in_list_query_with_real_parquet_data() -> Result<()> { Ok(()) } + +/// Helper function to create a SessionContext with all TPC-H tables registered as external tables +async fn tpch_context() -> Result<SessionContext> { + use datafusion_common::test_util::datafusion_test_data; + + let ctx = SessionContext::new(); + let test_data = datafusion_test_data(); Review Comment: there is also `parquet_test_data()` which stores data on `datafusion/parquet-testing` ########## datafusion/proto/tests/cases/roundtrip_physical_plan.rs: ########## @@ -1780,3 +1780,111 @@ async fn test_tpch_part_in_list_query_with_real_parquet_data() -> Result<()> { Ok(()) } + +/// Helper function to create a SessionContext with all TPC-H tables registered as external tables +async fn tpch_context() -> Result<SessionContext> { + use datafusion_common::test_util::datafusion_test_data; + + let ctx = SessionContext::new(); + let test_data = datafusion_test_data(); + + // TPC-H table names + let tables = [ + "part", "supplier", "partsupp", "customer", "orders", "lineitem", "nation", + "region", + ]; + + // Create external tables for all TPC-H tables + for table in &tables { + let table_sql = format!( + "CREATE EXTERNAL TABLE {table} STORED AS PARQUET LOCATION '{test_data}/tpch_{table}_small.parquet'" Review Comment: we can also use `register_parquet` -- 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