Dandandan commented on pull request #9865: URL: https://github.com/apache/arrow/pull/9865#issuecomment-813411456
This is the optimized plan, which looks ok, there is a `RepartitionExec` wrapping the `CsvExec` (which is ok) and a `MergeExec` just before `TopKExec`: ``` TopKExec { input: MergeExec { input: ProjectionExec { expr: [(Column { name: "customer_id" }, "customer_id"), (Column { name: "revenue" }, "revenue")], schema: Schema { fields: [Field { name: "customer_id", data_type: Utf8, nullable: false, dict_id: 0, dict_is_ordered: false, metadata: None }, Field { name: "revenue", data_type: Int64, nullable: false, dict_id: 0, dict_is_ordered: false, metadata: None }], metadata: {} }, input: CoalesceBatchesExec { input: RepartitionExec { input: CsvExec { path: "tests/customer.csv", filenames: ["tests/customer.csv"], schema: Schema { fields: [Field { name: "customer_id", data_type: Utf8, nullable: false, dict_id: 0, dict_is_ordered: false, metadata: None }, Field { name: "revenue", data_type: Int64, nullable: false, dict_id: 0, dict_is_ordered: false, metadata: None }], metadata: {} }, has_header: false, delimiter: Some(44), file_extension: ".csv", projection: Some([0, 1]), projected_schema: Schema { fields: [Field { name: "customer_id", data_t ype: Utf8, nullable: false, dict_id: 0, dict_is_ordered: false, metadata: None }, Field { name: "revenue", data_type: Int64, nullable: false, dict_id: 0, dict_is_ordered: false, metadata: None }], metadata: {} }, batch_size: 8192, limit: None }, partitioning: RoundRobinBatch(16), channels: Mutex { data: {} } }, target_batch_size: 4096 } } }, k: 3 } ``` -- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org