You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by yi...@apache.org on 2022/09/16 07:07:30 UTC

[doris] branch branch-1.1-lts updated (e9f7a3ee58 -> 82d62b2c3e)

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

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


    from e9f7a3ee58 [bugfix]fix segmentation fault at unalign address cast to int128 (#10094)
     new 66051917ad Revert "[Bug](lead) fix wrong child expression of `lead` function (#12587)"
     new 1775d8662d [1.1 bugfix] using rocksdb::slice instead of slice in olap meta
     new 82d62b2c3e [bugfix](1.1.3) warning in fe code could not reach in odbc table

The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 be/src/olap/olap_meta.cpp                          | 12 +++++------
 .../org/apache/doris/analysis/AnalyticExpr.java    |  5 +----
 .../java/org/apache/doris/analysis/CastExpr.java   |  5 ++---
 .../java/org/apache/doris/catalog/OdbcTable.java   |  1 -
 .../main/java/org/apache/doris/catalog/Type.java   | 23 ----------------------
 5 files changed, 9 insertions(+), 37 deletions(-)


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[doris] 01/03: Revert "[Bug](lead) fix wrong child expression of `lead` function (#12587)"

Posted by yi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 66051917ad19a9af19530e7733823fa25d58a673
Author: yiguolei <yi...@gmail.com>
AuthorDate: Fri Sep 16 14:38:13 2022 +0800

    Revert "[Bug](lead) fix wrong child expression of `lead` function (#12587)"
    
    This reverts commit 065745b1d1ba56b6ab40858b4901fc6f8e8bb6d8.
---
 .../org/apache/doris/analysis/AnalyticExpr.java    |  5 +----
 .../java/org/apache/doris/analysis/CastExpr.java   |  5 ++---
 .../main/java/org/apache/doris/catalog/Type.java   | 23 ----------------------
 3 files changed, 3 insertions(+), 30 deletions(-)

diff --git a/fe/fe-core/src/main/java/org/apache/doris/analysis/AnalyticExpr.java b/fe/fe-core/src/main/java/org/apache/doris/analysis/AnalyticExpr.java
index 3fd841fff2..a8adc13940 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/analysis/AnalyticExpr.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/analysis/AnalyticExpr.java
@@ -574,10 +574,7 @@ public class AnalyticExpr extends Expr {
             Type type = getFnCall().getChildren().get(2).getType();
 
             try {
-                if (!Type.matchExactType(getFnCall().getChildren().get(0).getType(),
-                        getFnCall().getChildren().get(2).getType())) {
-                    getFnCall().uncheckedCastChild(getFnCall().getChildren().get(0).getType(), 2);
-                }
+                getFnCall().uncheckedCastChild(getFnCall().getChildren().get(0).getType(), 2);
             }  catch (Exception e) {
                 LOG.warn("" , e);
                 throw new AnalysisException("Convert type error in offset fn(default value); old_type="
diff --git a/fe/fe-core/src/main/java/org/apache/doris/analysis/CastExpr.java b/fe/fe-core/src/main/java/org/apache/doris/analysis/CastExpr.java
index 58062f1d5f..261c1cf89a 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/analysis/CastExpr.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/analysis/CastExpr.java
@@ -239,9 +239,8 @@ public class CastExpr extends Expr {
         Type childType = getChild(0).getType();
 
         // this cast may result in loss of precision, but the user requested it
-        noOp = Type.matchExactType(childType, type);
-
-        if (noOp) {
+        if (childType.matchesType(type)) {
+            noOp = true;
             return;
         }
 
diff --git a/fe/fe-core/src/main/java/org/apache/doris/catalog/Type.java b/fe/fe-core/src/main/java/org/apache/doris/catalog/Type.java
index 9e3d55f2e0..01245d3529 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/catalog/Type.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/catalog/Type.java
@@ -1193,27 +1193,4 @@ public abstract class Type {
             return this.getPrimitiveType().getOlapColumnIndexSize();
         }
     }
-
-    // Whether `type1` matches the exact type of `type2`.
-    public static boolean matchExactType(Type type1, Type type2) {
-        if (type1.matchesType(type2)) {
-            if (PrimitiveType.typeWithPrecision.contains(type2.getPrimitiveType())) {
-                // For types which has precision and scale, we also need to check quality between precisions and scales
-                if ((((ScalarType) type2).decimalPrecision()
-                        == ((ScalarType) type1).decimalPrecision()) && (((ScalarType) type2).decimalScale()
-                        == ((ScalarType) type1).decimalScale())) {
-                    return true;
-                }
-            } else if (type2.isArrayType()) {
-                // For types array, we also need to check contains null for case like
-                // cast(array<not_null(int)> as array<int>)
-                if (((ArrayType) type2).getContainsNull() == ((ArrayType) type1).getContainsNull()) {
-                    return true;
-                }
-            } else {
-                return true;
-            }
-        }
-        return false;
-    }
 }


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[doris] 03/03: [bugfix](1.1.3) warning in fe code could not reach in odbc table

Posted by yi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 82d62b2c3e6c2df70d0e2ebe3bf00cce3ef162d7
Author: yiguolei <yi...@gmail.com>
AuthorDate: Fri Sep 16 15:04:16 2022 +0800

    [bugfix](1.1.3) warning in fe code could not reach in odbc table
---
 fe/fe-core/src/main/java/org/apache/doris/catalog/OdbcTable.java | 1 -
 1 file changed, 1 deletion(-)

diff --git a/fe/fe-core/src/main/java/org/apache/doris/catalog/OdbcTable.java b/fe/fe-core/src/main/java/org/apache/doris/catalog/OdbcTable.java
index 6e3cf3ba1a..55a5a6255b 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/catalog/OdbcTable.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/catalog/OdbcTable.java
@@ -97,7 +97,6 @@ public class OdbcTable extends Table {
             default:
                 return name;
         }
-        return name;
     }
 
     private String odbcCatalogResourceName;


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[doris] 02/03: [1.1 bugfix] using rocksdb::slice instead of slice in olap meta

Posted by yi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 1775d8662da7489317c6ae3303704f8b9eaf3b02
Author: yiguolei <yi...@gmail.com>
AuthorDate: Fri Sep 16 14:59:31 2022 +0800

    [1.1 bugfix] using rocksdb::slice instead of slice in olap meta
---
 be/src/olap/olap_meta.cpp | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/be/src/olap/olap_meta.cpp b/be/src/olap/olap_meta.cpp
index fa72121da9..95687b2f18 100644
--- a/be/src/olap/olap_meta.cpp
+++ b/be/src/olap/olap_meta.cpp
@@ -90,7 +90,7 @@ OLAPStatus OlapMeta::get(const int column_family_index, const std::string& key,
     rocksdb::Status s;
     {
         SCOPED_RAW_TIMER(&duration_ns);
-        s = _db->Get(ReadOptions(), handle, Slice(key), value);
+        s = _db->Get(ReadOptions(), handle, rocksdb::Slice(key), value);
     }
     DorisMetrics::instance()->meta_read_request_duration_us->increment(duration_ns / 1000);
     if (s.IsNotFound()) {
@@ -103,17 +103,17 @@ OLAPStatus OlapMeta::get(const int column_family_index, const std::string& key,
 }
 
 bool OlapMeta::key_may_exist(const int column_family_index, const std::string& key,
-                         std::string* value) {
+                             std::string* value) {
     DorisMetrics::instance()->meta_read_request_total->increment(1);
     rocksdb::ColumnFamilyHandle* handle = _handles[column_family_index];
     int64_t duration_ns = 0;
     bool is_exist = false;
     {
         SCOPED_RAW_TIMER(&duration_ns);
-        is_exist = _db->KeyMayExist(ReadOptions(), handle, Slice(key), value);
+        is_exist = _db->KeyMayExist(ReadOptions(), handle, rocksdb::Slice(key), value);
     }
     DorisMetrics::instance()->meta_read_request_duration_us->increment(duration_ns / 1000);
-    
+
     return is_exist;
 }
 
@@ -127,7 +127,7 @@ OLAPStatus OlapMeta::put(const int column_family_index, const std::string& key,
         SCOPED_RAW_TIMER(&duration_ns);
         WriteOptions write_options;
         write_options.sync = config::sync_tablet_meta;
-        s = _db->Put(write_options, handle, Slice(key), Slice(value));
+        s = _db->Put(write_options, handle, rocksdb::Slice(key), rocksdb::Slice(value));
     }
     DorisMetrics::instance()->meta_write_request_duration_us->increment(duration_ns / 1000);
     if (!s.ok()) {
@@ -146,7 +146,7 @@ OLAPStatus OlapMeta::remove(const int column_family_index, const std::string& ke
         SCOPED_RAW_TIMER(&duration_ns);
         WriteOptions write_options;
         write_options.sync = config::sync_tablet_meta;
-        s = _db->Delete(write_options, handle, Slice(key));
+        s = _db->Delete(write_options, handle, rocksdb::Slice(key));
     }
     DorisMetrics::instance()->meta_write_request_duration_us->increment(duration_ns / 1000);
     if (!s.ok()) {


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org