viirya commented on code in PR #11232: URL: https://github.com/apache/datafusion/pull/11232#discussion_r1663171064
########## datafusion/physical-plan/src/joins/hash_join.rs: ########## @@ -3844,6 +3851,103 @@ mod tests { Ok(()) } + pub fn build_table_struct( + struct_name: &str, + a: (&str, &Vec<Option<i32>>), + nulls: Option<NullBuffer>, + ) -> Arc<dyn ExecutionPlan> { + let inner_fields = vec![Field::new(a.0, DataType::Int32, true)]; + let schema = Schema::new(vec![Field::new( + struct_name, + DataType::Struct(inner_fields.clone().into()), + nulls.is_some(), + )]); + + let batch = RecordBatch::try_new( + Arc::new(schema), + vec![Arc::new(StructArray::new( + inner_fields.into(), + vec![Arc::new(Int32Array::from(a.1.clone()))], + nulls, + ))], + ) + .unwrap(); + let schema_ref = batch.schema(); + Arc::new(MemoryExec::try_new(&[vec![batch]], schema_ref, None).unwrap()) + } + + #[tokio::test] + async fn join_on_struct() -> Result<()> { Review Comment: Can we add e2e tests too? -- 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