eldenmoon commented on code in PR #47889:
URL: https://github.com/apache/doris/pull/47889#discussion_r1959554037
##########
be/src/vec/data_types/serde/data_type_date64_serde.cpp:
##########
@@ -235,6 +242,23 @@ void DataTypeDate64SerDe::read_column_from_arrow(IColumn&
column, const arrow::A
v.cast_to_date();
col_data.emplace_back(binary_cast<VecDateTimeValue, Int64>(v));
}
+ } else if (arrow_array->type()->id() == arrow::Type::STRING) {
+ // to be compatible with old version, we use string type for date.
+ auto concrete_array = dynamic_cast<const
arrow::StringArray*>(arrow_array);
Review Comment:
why modify this code?
##########
be/src/vec/data_types/serde/data_type_date64_serde.cpp:
##########
@@ -70,6 +75,11 @@ Status
DataTypeDate64SerDe::deserialize_column_from_json_vector(
Status DataTypeDate64SerDe::deserialize_one_cell_from_json(IColumn& column,
Slice& slice,
const
FormatOptions& options) const {
auto& column_data = assert_cast<ColumnInt64&>(column);
+ if (_nesting_level > 1) {
+ std::cout << "slice.data: " << ReadBuffer(slice.data,
slice.size).to_string() << std::endl;
Review Comment:
std::cout ?
##########
be/src/util/arrow/row_batch.cpp:
##########
@@ -85,12 +85,14 @@ Status convert_to_arrow_type(const TypeDescriptor& type,
std::shared_ptr<arrow::
case TYPE_LARGEINT:
case TYPE_VARCHAR:
case TYPE_CHAR:
- case TYPE_DATE:
- case TYPE_DATETIME:
case TYPE_STRING:
case TYPE_JSONB:
*result = arrow::utf8();
break;
+ case TYPE_DATE:
+ case TYPE_DATETIME:
+ *result = std::make_shared<arrow::Date64Type>();
Review Comment:
why modify this?
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]