geoffreyclaude commented on code in PR #22991:
URL: https://github.com/apache/datafusion/pull/22991#discussion_r3433340901
##########
datafusion/physical-plan/src/topk/mod.rs:
##########
@@ -1101,86 +1208,111 @@ mod tests {
assert_eq!(record_batch_store.batches_size, 0);
}
- /// Builds an `(a Int32, b Float64)` schema and a `TopK` with full sort
- /// `(a ASC, b ASC)`, input prefix `[a]`, `k = 3`, `batch_size = 2`. Used
by
- /// the prefix-completion tests below to keep their per-scenario logic in
focus.
- fn build_ab_prefix_topk() -> Result<(Arc<Schema>, TopK)> {
- let schema = Arc::new(Schema::new(vec![
- Field::new("a", DataType::Int32, false),
+ fn make_ab_schema() -> SchemaRef {
+ make_ab_schema_with_nullable_a(false)
+ }
+
+ fn make_ab_schema_with_nullable_a(a_nullable: bool) -> SchemaRef {
+ Arc::new(Schema::new(vec![
+ Field::new("a", DataType::Int32, a_nullable),
Field::new("b", DataType::Float64, false),
- ]));
+ ]))
+ }
+
+ fn make_topk_filter() -> Arc<RwLock<TopKDynamicFilters>> {
Review Comment:
Thanks, factorized in c05846fd9
--
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]