Skip to content

ARROW-12420: [C++/Dataset] Reading null columns as dictionary not longer possible#10093

Closed
kszucs wants to merge 2 commits into
apache:masterfrom
kszucs:ARROW-12420
Closed

ARROW-12420: [C++/Dataset] Reading null columns as dictionary not longer possible#10093
kszucs wants to merge 2 commits into
apache:masterfrom
kszucs:ARROW-12420

Conversation

@kszucs

@kszucs kszucs commented Apr 18, 2021

Copy link
Copy Markdown
Member

No description provided.

@github-actions

Copy link
Copy Markdown

Comment thread cpp/src/arrow/array/array_dict.cc
@kszucs

kszucs commented Apr 18, 2021

Copy link
Copy Markdown
Member Author

I reproduced the problem using a simple cast test from null array to a dictionary array:

TEST(Cast, FromNullToDictionary) {
  auto from = std::make_shared<NullArray>(10);
  auto to_type = dictionary(int8(), boolean());

  ASSERT_OK_AND_ASSIGN(auto expected, MakeArrayOfNull(to_type, 10));
  CheckCast(from, expected);
}

Somewhere ArrayData::dictionary gets set to nullptr or not set at all. I don't have a solution yet, it's a but hard to debug due to the Datum variant.

cc @bkietz

@wesm wesm left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 here, merge on green build

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants