diff --git a/be/src/olap/row_cursor.cpp b/be/src/olap/row_cursor.cpp index 33f5b0a0c79362..ad20d7c33514ff 100644 --- a/be/src/olap/row_cursor.cpp +++ b/be/src/olap/row_cursor.cpp @@ -51,7 +51,8 @@ Status RowCursor::_init(const std::vector& columns) { return Status::Error(); } _variable_len += column_schema(cid)->get_variable_len(); - if (_schema->column(cid)->type() == OLAP_FIELD_TYPE_STRING || _schema->column(cid)->type() == OLAP_FIELD_TYPE_JSONB) { + if (_schema->column(cid)->type() == OLAP_FIELD_TYPE_STRING || + _schema->column(cid)->type() == OLAP_FIELD_TYPE_JSONB) { ++_string_field_count; } } @@ -221,7 +222,8 @@ Status RowCursor::allocate_memory_for_string_type(TabletSchemaSPtr schema) { char** long_text_ptr = _long_text_buf; for (auto cid : _schema->column_ids()) { fixed_ptr = _fixed_buf + _schema->column_offset(cid); - if (_schema->column(cid)->type() == OLAP_FIELD_TYPE_STRING || _schema->column(cid)->type() == OLAP_FIELD_TYPE_JSONB) { + if (_schema->column(cid)->type() == OLAP_FIELD_TYPE_STRING || + _schema->column(cid)->type() == OLAP_FIELD_TYPE_JSONB) { Slice* slice = reinterpret_cast(fixed_ptr + 1); _schema->mutable_column(cid)->set_long_text_buf(long_text_ptr); slice->data = *(long_text_ptr); diff --git a/be/src/runtime/export_sink.cpp b/be/src/runtime/export_sink.cpp index 61e3f4e4c44663..f709c182ec9e97 100644 --- a/be/src/runtime/export_sink.cpp +++ b/be/src/runtime/export_sink.cpp @@ -35,8 +35,6 @@ #include "util/types.h" #include "util/uid_util.h" - - namespace doris { ExportSink::ExportSink(ObjectPool* pool, const RowDescriptor& row_desc, diff --git a/be/src/vec/exec/format/parquet/parquet_pred_cmp.h b/be/src/vec/exec/format/parquet/parquet_pred_cmp.h index 727e0e57f2975b..54244a2ae206e2 100644 --- a/be/src/vec/exec/format/parquet/parquet_pred_cmp.h +++ b/be/src/vec/exec/format/parquet/parquet_pred_cmp.h @@ -220,6 +220,13 @@ class ParquetPredicate { std::is_same_v>) { min_value.from_unixtime(min_date_value * 24 * 60 * 60, ctz); max_value.from_unixtime(max_date_value * 24 * 60 * 60, ctz); + + // as DateTimeValue can not compare date and datetime, so need + // cast to date here + if constexpr (std::is_same_v) { + min_value.cast_to_date(); + max_value.cast_to_date(); + } } else { return false; }