Describe the bug, including details regarding any error messages, version, and platform.
Found when working on dictionary encoding in nanoarrow in apache/arrow-nanoarrow#861 ...I have yet to confirm independently of that. The bit of code this affects for me checking a roundtrip of an empty record batch through IPC...I am not sure it actually makes sense for any practical purpose to have an empty (but ordered) dictionary.
EXPECT_EQ(maybe_batch.ValueUnsafe()->ToString(), empty->ToString());
if (data_type->id() != arrow::Type::DICTIONARY ||
!std::static_pointer_cast<arrow::DictionaryType>(data_type)->ordered()) {
EXPECT_TRUE(maybe_batch.ValueUnsafe()->Equals(*empty)) << empty->ToString();
}
Component(s)
C++