From 6024066e9268f319d9a1f356f80ddb3ece728bb6 Mon Sep 17 00:00:00 2001 From: Enrico Minack Date: Thu, 31 Oct 2024 13:00:32 +0100 Subject: [PATCH] Merge require_sequenced_output and implicit_ordering --- cpp/src/arrow/dataset/scanner.cc | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/cpp/src/arrow/dataset/scanner.cc b/cpp/src/arrow/dataset/scanner.cc index 832e5d9160b91..aebb5ae13737c 100644 --- a/cpp/src/arrow/dataset/scanner.cc +++ b/cpp/src/arrow/dataset/scanner.cc @@ -1062,7 +1062,8 @@ Result MakeScanNode(acero::ExecPlan* plan, return batch; }); - auto ordering = require_sequenced_output ? Ordering::Implicit() : Ordering::Unordered(); + auto ordering = require_sequenced_output || implicit_ordering ? Ordering::Implicit() + : Ordering::Unordered(); auto fields = scan_options->dataset_schema->fields(); if (scan_options->add_augmented_fields) { @@ -1071,11 +1072,6 @@ Result MakeScanNode(acero::ExecPlan* plan, } } - Ordering ordering = Ordering::Unordered(); - if (implicit_ordering) { - ordering = Ordering::Implicit(); - } - return acero::MakeExecNode( "source", plan, {}, acero::SourceNodeOptions{schema(std::move(fields)), std::move(gen), ordering});