From ca0285cebdc090c705294299ef0da1d6e2753ecf Mon Sep 17 00:00:00 2001 From: Thomas Newton Date: Fri, 1 Nov 2024 10:44:13 +0000 Subject: [PATCH] REvert debug changes --- cpp/src/arrow/dataset/scanner_test.cc | 30 +++++++++++++-------------- cpp/src/arrow/datum.cc | 6 ++---- 2 files changed, 16 insertions(+), 20 deletions(-) diff --git a/cpp/src/arrow/dataset/scanner_test.cc b/cpp/src/arrow/dataset/scanner_test.cc index ad6933e0ad358..7c78ac5669d55 100644 --- a/cpp/src/arrow/dataset/scanner_test.cc +++ b/cpp/src/arrow/dataset/scanner_test.cc @@ -2343,17 +2343,17 @@ DatasetAndBatches MakeNestedDataset() { { { R"([{"a": 1, "b": null, "c": {"e": 0}}, - {"a": 2, "b": true, "c": {"e": 1}}])", + {"a": 2, "b": true, "c": {"e": 1}}])", R"([{"a": null, "b": true, "c": {"e": 2}}, - {"a": 3, "b": false, "c": {"e": null}}])", + {"a": 3, "b": false, "c": {"e": null}}])", R"([{"a": null, "b": null, "c": null}])", }, { R"([{"a": null, "b": true, "c": {"e": 4}}, - {"a": 4, "b": false, "c": null}])", + {"a": 4, "b": false, "c": null}])", R"([{"a": 5, "b": null, "c": {"e": 6}}, - {"a": 6, "b": false, "c": {"e": 7}}, - {"a": 7, "b": false, "c": {"e": null}}])", + {"a": 6, "b": false, "c": {"e": 7}}, + {"a": 7, "b": false, "c": {"e": null}}])", }, }, /*guarantees=*/{}); @@ -2536,17 +2536,15 @@ TEST(ScanNode, MaterializationOfNestedVirtualColumn) { auto options = std::make_shared(); options->projection = Materialize({"a", "b", "c"}, /*include_aug_fields=*/true); - ASSERT_OK( - acero::Declaration::Sequence({ - {"scan", ScanNodeOptions{nested.dataset, options}}, - {"augmented_project", acero::ProjectNodeOptions{{ - field_ref("a"), - field_ref("b"), - field_ref("c"), - }}}, - {"sink", acero::SinkNodeOptions{&plan.sink_gen}}, - }) - .AddToPlan(plan.get())); + ASSERT_OK(acero::Declaration::Sequence( + { + {"scan", ScanNodeOptions{nested.dataset, options}}, + {"augmented_project", + acero::ProjectNodeOptions{ + {field_ref("a"), field_ref("b"), field_ref("c")}}}, + {"sink", acero::SinkNodeOptions{&plan.sink_gen}}, + }) + .AddToPlan(plan.get())); auto expected = nested.batches; diff --git a/cpp/src/arrow/datum.cc b/cpp/src/arrow/datum.cc index 00b870de9be2b..2ac230232e1b7 100644 --- a/cpp/src/arrow/datum.cc +++ b/cpp/src/arrow/datum.cc @@ -164,10 +164,8 @@ bool Datum::Equals(const Datum& other) const { return true; case Datum::SCALAR: return internal::SharedPtrEquals(this->scalar(), other.scalar()); - case Datum::ARRAY: { - bool equal = internal::SharedPtrEquals(this->make_array(), other.make_array()); - return equal; - } + case Datum::ARRAY: + return internal::SharedPtrEquals(this->make_array(), other.make_array()); case Datum::CHUNKED_ARRAY: return internal::SharedPtrEquals(this->chunked_array(), other.chunked_array()); case Datum::RECORD_BATCH: