This is an automated email from the ASF dual-hosted git repository.

yiguolei pushed a commit to branch branch-1.2-lts
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/branch-1.2-lts by this push:
     new d915876e179 [BugFix](ParquetReader) Branch 1.2 lts fix parquet 
pushdown error (#30076)
d915876e179 is described below

commit d915876e1798157e00d1765bfc892813c0ab716f
Author: GoGoWen <[email protected]>
AuthorDate: Sun Feb 4 18:14:06 2024 +0800

    [BugFix](ParquetReader) Branch 1.2 lts fix parquet pushdown error (#30076)
    
    * fix date type conjunct push down to parquet bug
    
    * fix code style
---
 be/src/vec/exec/format/parquet/parquet_pred_cmp.h | 7 +++++++
 1 file changed, 7 insertions(+)

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 727e0e57f29..54244a2ae20 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 @@ private:
                               std::is_same_v<CppType, 
DateV2Value<DateV2ValueType>>) {
                     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<CppType, DateTimeValue>) {
+                        min_value.cast_to_date();
+                        max_value.cast_to_date();
+                    }
                 } else {
                     return false;
                 }


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to