Skip to content

Commit

Permalink
REvert debug changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Tom-Newton committed Nov 1, 2024
1 parent 69d962e commit ca0285c
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 20 deletions.
30 changes: 14 additions & 16 deletions cpp/src/arrow/dataset/scanner_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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=*/{});
Expand Down Expand Up @@ -2536,17 +2536,15 @@ TEST(ScanNode, MaterializationOfNestedVirtualColumn) {
auto options = std::make_shared<ScanOptions>();
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;

Expand Down
6 changes: 2 additions & 4 deletions cpp/src/arrow/datum.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit ca0285c

Please sign in to comment.