lxy-9602 commented on code in PR #373:
URL: https://github.com/apache/paimon-cpp/pull/373#discussion_r4129285129
##########
src/paimon/core/casting/casting_utils.cpp:
##########
@@ -23,6 +23,19 @@
#include "paimon/common/utils/checked_cast.h"
namespace paimon {
+Result<std::shared_ptr<arrow::Array>> CastingUtils::DecodeDictionary(
+ const std::shared_ptr<arrow::Array>& array, arrow::MemoryPool* pool) {
+ if (array->type_id() != arrow::Type::DICTIONARY) {
+ return array;
+ }
+ const auto& dictionary_type = checked_cast<const
arrow::DictionaryType&>(*array->type());
+ std::shared_ptr<arrow::DataType> value_type = dictionary_type.value_type();
+ if (value_type->id() == arrow::Type::LARGE_STRING) {
+ value_type = arrow::utf8();
+ }
Review Comment:
Thanks for the explanation. Please add a comment here explaining that,
because of `BLOB` type, we keep the original type for `LARGE_BINARY` here.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]