alexanderbianchi commented on code in PR #27525:
URL: https://github.com/apache/datafusion/pull/27525#discussion_r4606897863
##########
datafusion/substrait/benches/consume_union.rs:
##########
@@ -0,0 +1,65 @@
+// SPDX-License-Identifier: Apache-2.0
+// SPDX-FileCopyrightText: See the NOTICE file distributed with this work for
additional information regarding copyright ownership
+// SPDX-FileContributor: Licensed to the Apache Software Foundation (ASF)
under one or more contributor license agreements
+
+//! Benchmarks for consuming Substrait plans with wide `UNION ALL`s, as
produced by
+//! queries generated over many tables.
+
+use std::hint::black_box;
+use std::sync::Arc;
+
+use criterion::{Criterion, criterion_group, criterion_main};
+use datafusion::arrow::datatypes::{DataType, Field, Schema};
+use datafusion::datasource::MemTable;
+use datafusion::prelude::SessionContext;
+use datafusion_substrait::logical_plan::consumer::from_substrait_plan;
+use datafusion_substrait::logical_plan::producer::to_substrait_plan;
+use tokio::runtime::Builder;
+
+const COLUMNS: usize = 20;
+
+/// Registers `inputs` distinct tables and returns a `UNION ALL` over all of
them. Distinct
+/// tables matter: inputs that share a qualifier would collapse when schemas
are merged.
+fn register_wide_union(ctx: &SessionContext, inputs: usize) -> String {
Review Comment:
I don't have the power, but I think if you add this benchmark as the first
commit they can compare that commit and the newest via a bot in the comments.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]