This is an automated email from the ASF dual-hosted git repository.
morrysnow pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/master by this push:
new 0d85bd1183f [chore](expr) remove isAnalysis flag on Expr (#59119)
0d85bd1183f is described below
commit 0d85bd1183f9e1b2a6d32cce7bec2282429a71f7
Author: morrySnow <[email protected]>
AuthorDate: Thu Dec 18 14:51:21 2025 +0800
[chore](expr) remove isAnalysis flag on Expr (#59119)
---
.../org/apache/doris/analysis/ArithmeticExpr.java | 1 -
.../org/apache/doris/analysis/ArrayLiteral.java | 1 -
.../java/org/apache/doris/analysis/CastExpr.java | 1 -
.../org/apache/doris/analysis/DateLiteral.java | 9 -----
.../org/apache/doris/analysis/DecimalLiteral.java | 3 --
.../main/java/org/apache/doris/analysis/Expr.java | 43 +---------------------
.../apache/doris/analysis/ExprSubstitutionMap.java | 2 -
.../org/apache/doris/analysis/FloatLiteral.java | 1 -
.../org/apache/doris/analysis/IPv4Literal.java | 2 -
.../org/apache/doris/analysis/IPv6Literal.java | 1 -
.../java/org/apache/doris/analysis/IntLiteral.java | 3 --
.../org/apache/doris/analysis/JsonLiteral.java | 1 -
.../org/apache/doris/analysis/LargeIntLiteral.java | 2 -
.../org/apache/doris/analysis/NullLiteral.java | 1 -
.../org/apache/doris/analysis/PlaceHolderExpr.java | 10 -----
.../org/apache/doris/analysis/SearchPredicate.java | 2 +-
.../java/org/apache/doris/analysis/SlotRef.java | 3 --
.../org/apache/doris/analysis/StringLiteral.java | 1 -
.../org/apache/doris/analysis/TimeV2Literal.java | 1 -
.../apache/doris/analysis/VarBinaryLiteral.java | 1 -
.../org/apache/doris/planner/OlapTableSink.java | 3 --
.../apache/doris/analysis/SearchPredicateTest.java | 5 ---
22 files changed, 3 insertions(+), 94 deletions(-)
diff --git
a/fe/fe-core/src/main/java/org/apache/doris/analysis/ArithmeticExpr.java
b/fe/fe-core/src/main/java/org/apache/doris/analysis/ArithmeticExpr.java
index 0d0f5ca9ef4..456e849f399 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/analysis/ArithmeticExpr.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/analysis/ArithmeticExpr.java
@@ -95,7 +95,6 @@ public class ArithmeticExpr extends Expr {
fn = new Function(new FunctionName(op.getName()), argTypes,
returnType, false, true, nullableMode);
type = returnType;
this.nullable = nullable;
- analysisDone();
}
/**
diff --git
a/fe/fe-core/src/main/java/org/apache/doris/analysis/ArrayLiteral.java
b/fe/fe-core/src/main/java/org/apache/doris/analysis/ArrayLiteral.java
index fa3c49c618f..43e4a4f1826 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/analysis/ArrayLiteral.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/analysis/ArrayLiteral.java
@@ -44,7 +44,6 @@ public class ArrayLiteral extends LiteralExpr {
this.type = type;
children = new ArrayList<>(Arrays.asList(exprs));
this.nullable = false;
- analysisDone();
}
protected ArrayLiteral(ArrayLiteral other) {
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 a16aeabeacf..bac4535c324 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
@@ -65,7 +65,6 @@ public class CastExpr extends Expr {
}
}
this.nullable = nullable;
- analysisDone();
}
protected CastExpr(CastExpr other) {
diff --git
a/fe/fe-core/src/main/java/org/apache/doris/analysis/DateLiteral.java
b/fe/fe-core/src/main/java/org/apache/doris/analysis/DateLiteral.java
index 9016f059d34..a9ca132ac76 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/analysis/DateLiteral.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/analysis/DateLiteral.java
@@ -225,21 +225,18 @@ public class DateLiteral extends LiteralExpr {
}
this.type = type;
this.nullable = false;
- analysisDone();
}
public DateLiteral(String s, Type type) throws AnalysisException {
super();
init(s, type);
this.nullable = false;
- analysisDone();
}
public DateLiteral(String s) throws AnalysisException {
super();
init(s, null);
this.nullable = false;
- analysisDone();
}
public DateLiteral(long year, long month, long day) {
@@ -251,7 +248,6 @@ public class DateLiteral extends LiteralExpr {
this.day = day;
this.type = ScalarType.getDefaultDateType(Type.DATE);
this.nullable = false;
- analysisDone();
}
public DateLiteral(long year, long month, long day, Type type) {
@@ -262,7 +258,6 @@ public class DateLiteral extends LiteralExpr {
||
type.getPrimitiveType().equals(Type.DATEV2.getPrimitiveType()));
this.type = type;
this.nullable = false;
- analysisDone();
}
private DateLiteral(long year, long month, long day, long hour, long
minute, long second) {
@@ -274,7 +269,6 @@ public class DateLiteral extends LiteralExpr {
this.day = day;
this.type = ScalarType.getDefaultDateType(Type.DATETIME);
this.nullable = false;
- analysisDone();
}
public DateLiteral(long year, long month, long day, long hour, long
minute, long second, long microsecond,
@@ -289,7 +283,6 @@ public class DateLiteral extends LiteralExpr {
Preconditions.checkArgument(type.isDatetimeV2() ||
type.isTimeStampTz());
this.type = type;
this.nullable = false;
- analysisDone();
}
public DateLiteral(long year, long month, long day, long hour, long
minute, long second, Type type) {
@@ -304,7 +297,6 @@ public class DateLiteral extends LiteralExpr {
||
type.getPrimitiveType().equals(Type.TIMESTAMPTZ.getPrimitiveType()));
this.type = type;
this.nullable = false;
- analysisDone();
}
public DateLiteral(LocalDateTime dateTime, Type type) {
@@ -319,7 +311,6 @@ public class DateLiteral extends LiteralExpr {
this.microsecond = dateTime.get(ChronoField.MICRO_OF_SECOND);
}
this.nullable = false;
- analysisDone();
}
public DateLiteral(DateLiteral other) {
diff --git
a/fe/fe-core/src/main/java/org/apache/doris/analysis/DecimalLiteral.java
b/fe/fe-core/src/main/java/org/apache/doris/analysis/DecimalLiteral.java
index 91b6fc89cc9..779ca177a28 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/analysis/DecimalLiteral.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/analysis/DecimalLiteral.java
@@ -48,14 +48,12 @@ public class DecimalLiteral extends NumericLiteralExpr {
public DecimalLiteral(BigDecimal value) {
init(value, Config.enable_decimal_conversion);
this.nullable = false;
- analysisDone();
}
public DecimalLiteral(BigDecimal value, Type type) {
this.value = value;
this.type = type;
this.nullable = false;
- analysisDone();
}
public DecimalLiteral(String value) throws AnalysisException {
@@ -67,7 +65,6 @@ public class DecimalLiteral extends NumericLiteralExpr {
}
init(v);
this.nullable = false;
- analysisDone();
}
protected DecimalLiteral(DecimalLiteral other) {
diff --git a/fe/fe-core/src/main/java/org/apache/doris/analysis/Expr.java
b/fe/fe-core/src/main/java/org/apache/doris/analysis/Expr.java
index 0519af4ae7f..8638110c96c 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/analysis/Expr.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/analysis/Expr.java
@@ -66,8 +66,6 @@ public abstract class Expr extends TreeNode<Expr> implements
Cloneable {
@SerializedName("type")
protected Type type; // result of analysis
- protected boolean isAnalyzed = false; // true after analyze() has been
called
-
@SerializedName("opcode")
protected TExprOpcode opcode; // opcode for this expr
@@ -76,7 +74,7 @@ public abstract class Expr extends TreeNode<Expr> implements
Cloneable {
protected Function fn;
// Cached value of IsConstant(), set during analyze() and valid if
isAnalyzed_ is true.
- private Supplier<Boolean> isConstant = Suppliers.memoize(() -> false);
+ private Supplier<Boolean> isConstant =
Suppliers.memoize(this::isConstantImpl);
protected Optional<String> exprName = Optional.empty();
@@ -89,7 +87,6 @@ public abstract class Expr extends TreeNode<Expr> implements
Cloneable {
protected Expr(Expr other) {
super();
type = other.type;
- isAnalyzed = other.isAnalyzed;
opcode = other.opcode;
isConstant = other.isConstant;
fn = other.fn;
@@ -97,10 +94,6 @@ public abstract class Expr extends TreeNode<Expr> implements
Cloneable {
nullable = other.nullable;
}
- public boolean isAnalyzed() {
- return isAnalyzed;
- }
-
public void checkValueValid() throws AnalysisException {
}
@@ -130,17 +123,6 @@ public abstract class Expr extends TreeNode<Expr>
implements Cloneable {
return fn;
}
- /**
- * Set the expr to be analyzed and computes isConstant_.
- */
- protected void analysisDone() {
- Preconditions.checkState(!isAnalyzed);
- // We need to compute the const-ness as the last step, since analysis
may change
- // the result, e.g. by resolving function.
- isConstant = Suppliers.memoize(this::isConstantImpl);
- isAnalyzed = true;
- }
-
/**
* Collects the returns types of the child nodes in an array.
*/
@@ -185,20 +167,6 @@ public abstract class Expr extends TreeNode<Expr>
implements Cloneable {
return "(" + Joiner.on(" ").join(strings) + ")";
}
- public static <C extends Expr> HashMap<C, Integer> toCountMap(List<C>
list) {
- HashMap countMap = new HashMap<C, Integer>();
- for (int i = 0; i < list.size(); i++) {
- C obj = list.get(i);
- Integer count = (Integer) countMap.get(obj);
- if (count == null) {
- countMap.put(obj, 1);
- } else {
- countMap.put(obj, count + 1);
- }
- }
- return countMap;
- }
-
/**
* Create a deep copy of 'l'. If sMap is non-null, use it to substitute the
* elements of l.
@@ -475,10 +443,7 @@ public abstract class Expr extends TreeNode<Expr>
implements Cloneable {
* FunctionCallExpr.isConstant()).
*/
public final boolean isConstant() {
- if (isAnalyzed) {
- return isConstant.get();
- }
- return isConstantImpl();
+ return isConstant.get();
}
/**
@@ -594,10 +559,6 @@ public abstract class Expr extends TreeNode<Expr>
implements Cloneable {
return this instanceof NullLiteral;
}
- public void setNullable(boolean nullable) {
- this.nullable = nullable;
- }
-
public Set<SlotRef> getInputSlotRef() {
Set<SlotRef> slots = new HashSet<>();
if (this instanceof SlotRef) {
diff --git
a/fe/fe-core/src/main/java/org/apache/doris/analysis/ExprSubstitutionMap.java
b/fe/fe-core/src/main/java/org/apache/doris/analysis/ExprSubstitutionMap.java
index 79b7f7f7f26..903dfe3a2a8 100644
---
a/fe/fe-core/src/main/java/org/apache/doris/analysis/ExprSubstitutionMap.java
+++
b/fe/fe-core/src/main/java/org/apache/doris/analysis/ExprSubstitutionMap.java
@@ -20,7 +20,6 @@
package org.apache.doris.analysis;
-import com.google.common.base.Preconditions;
import com.google.common.collect.Lists;
import java.util.List;
@@ -52,7 +51,6 @@ public final class ExprSubstitutionMap {
* across query blocks. It is not required that the lhsExpr is analyzed.
*/
public void put(Expr lhsExpr, Expr rhsExpr) {
- Preconditions.checkState(rhsExpr.isAnalyzed(), "Rhs expr must be
analyzed.");
lhs.add(lhsExpr);
rhs.add(rhsExpr);
}
diff --git
a/fe/fe-core/src/main/java/org/apache/doris/analysis/FloatLiteral.java
b/fe/fe-core/src/main/java/org/apache/doris/analysis/FloatLiteral.java
index 2c7d18ab367..412457e608d 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/analysis/FloatLiteral.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/analysis/FloatLiteral.java
@@ -53,7 +53,6 @@ public class FloatLiteral extends NumericLiteralExpr {
this.value = value.doubleValue();
this.type = type;
this.nullable = false;
- analysisDone();
}
public FloatLiteral(String value) throws AnalysisException {
diff --git
a/fe/fe-core/src/main/java/org/apache/doris/analysis/IPv4Literal.java
b/fe/fe-core/src/main/java/org/apache/doris/analysis/IPv4Literal.java
index 117ce072bd0..588780d12f1 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/analysis/IPv4Literal.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/analysis/IPv4Literal.java
@@ -48,7 +48,6 @@ public class IPv4Literal extends LiteralExpr {
this.value = value;
this.type = Type.IPV4;
this.nullable = false;
- analysisDone();
}
public IPv4Literal(String value) throws AnalysisException {
@@ -56,7 +55,6 @@ public class IPv4Literal extends LiteralExpr {
this.value = parseIPv4toLong(value);
this.type = Type.IPV4;
this.nullable = false;
- analysisDone();
}
protected IPv4Literal(IPv4Literal other) {
diff --git
a/fe/fe-core/src/main/java/org/apache/doris/analysis/IPv6Literal.java
b/fe/fe-core/src/main/java/org/apache/doris/analysis/IPv6Literal.java
index 2497d282918..4afd7d87446 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/analysis/IPv6Literal.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/analysis/IPv6Literal.java
@@ -58,7 +58,6 @@ public class IPv6Literal extends LiteralExpr {
this.value = value;
this.type = Type.IPV6;
this.nullable = false;
- analysisDone();
}
protected IPv6Literal(IPv6Literal other) {
diff --git a/fe/fe-core/src/main/java/org/apache/doris/analysis/IntLiteral.java
b/fe/fe-core/src/main/java/org/apache/doris/analysis/IntLiteral.java
index 55eb72535da..e8eb4531729 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/analysis/IntLiteral.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/analysis/IntLiteral.java
@@ -57,7 +57,6 @@ public class IntLiteral extends NumericLiteralExpr {
super();
init(value);
this.nullable = false;
- analysisDone();
}
public IntLiteral(long longValue, Type type) throws AnalysisException {
@@ -66,7 +65,6 @@ public class IntLiteral extends NumericLiteralExpr {
this.value = longValue;
this.type = type;
this.nullable = false;
- analysisDone();
}
public IntLiteral(String value, Type type) throws AnalysisException {
@@ -82,7 +80,6 @@ public class IntLiteral extends NumericLiteralExpr {
this.value = longValue;
this.type = type;
this.nullable = false;
- analysisDone();
}
protected IntLiteral(IntLiteral other) {
diff --git
a/fe/fe-core/src/main/java/org/apache/doris/analysis/JsonLiteral.java
b/fe/fe-core/src/main/java/org/apache/doris/analysis/JsonLiteral.java
index bf076f10663..79559ac25f0 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/analysis/JsonLiteral.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/analysis/JsonLiteral.java
@@ -54,7 +54,6 @@ public class JsonLiteral extends LiteralExpr {
this.value = value;
type = Type.JSONB;
this.nullable = false;
- analysisDone();
}
protected JsonLiteral(JsonLiteral other) {
diff --git
a/fe/fe-core/src/main/java/org/apache/doris/analysis/LargeIntLiteral.java
b/fe/fe-core/src/main/java/org/apache/doris/analysis/LargeIntLiteral.java
index 5aca0268e23..edec31f6a88 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/analysis/LargeIntLiteral.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/analysis/LargeIntLiteral.java
@@ -47,7 +47,6 @@ public class LargeIntLiteral extends NumericLiteralExpr {
public LargeIntLiteral() {
super();
- analysisDone();
}
public LargeIntLiteral(BigInteger v) {
@@ -75,7 +74,6 @@ public class LargeIntLiteral extends NumericLiteralExpr {
this.value = bigInt;
type = Type.LARGEINT;
this.nullable = false;
- analysisDone();
}
protected LargeIntLiteral(LargeIntLiteral other) {
diff --git
a/fe/fe-core/src/main/java/org/apache/doris/analysis/NullLiteral.java
b/fe/fe-core/src/main/java/org/apache/doris/analysis/NullLiteral.java
index c0da1502304..187d61d57bf 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/analysis/NullLiteral.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/analysis/NullLiteral.java
@@ -52,7 +52,6 @@ public class NullLiteral extends LiteralExpr {
public static NullLiteral create(Type type) {
NullLiteral l = new NullLiteral();
l.type = type;
- l.analysisDone();
return l;
}
diff --git
a/fe/fe-core/src/main/java/org/apache/doris/analysis/PlaceHolderExpr.java
b/fe/fe-core/src/main/java/org/apache/doris/analysis/PlaceHolderExpr.java
index 098f6cf240e..0090a44f152 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/analysis/PlaceHolderExpr.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/analysis/PlaceHolderExpr.java
@@ -50,16 +50,6 @@ public class PlaceHolderExpr extends LiteralExpr {
return lExpr;
}
- @Override
- protected void analysisDone() {
- if (lExpr != null && !lExpr.isAnalyzed) {
- lExpr.analysisDone();
- }
- if (!isAnalyzed) {
- super.analysisDone();
- }
- }
-
public static PlaceHolderExpr create(String value, Type type) throws
AnalysisException {
Preconditions.checkArgument(!type.equals(Type.INVALID));
return new PlaceHolderExpr(LiteralExpr.create(value, type));
diff --git
a/fe/fe-core/src/main/java/org/apache/doris/analysis/SearchPredicate.java
b/fe/fe-core/src/main/java/org/apache/doris/analysis/SearchPredicate.java
index c54f8f5b602..7ed0fb4b5d2 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/analysis/SearchPredicate.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/analysis/SearchPredicate.java
@@ -105,7 +105,7 @@ public class SearchPredicate extends Predicate {
SlotRef slotRef = (SlotRef) child;
LOG.info("SearchPredicate.toThrift: SlotRef details -
column={}",
slotRef.getColumnName());
- if (slotRef.isAnalyzed() && slotRef.getDesc() != null) {
+ if (slotRef.getDesc() != null) {
LOG.info("SearchPredicate.toThrift: SlotRef analyzed -
slotId={}",
slotRef.getSlotId());
}
diff --git a/fe/fe-core/src/main/java/org/apache/doris/analysis/SlotRef.java
b/fe/fe-core/src/main/java/org/apache/doris/analysis/SlotRef.java
index 78548c5bd38..7efb79a0057 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/analysis/SlotRef.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/analysis/SlotRef.java
@@ -86,7 +86,6 @@ public class SlotRef extends Expr {
}
this.subColPath = desc.getSubColLables();
this.nullable = desc.getIsNullable();
- analysisDone();
}
// nereids use this constructor to build aggFnParam
@@ -122,7 +121,6 @@ public class SlotRef extends Expr {
}
public SlotId getSlotId() {
- Preconditions.checkState(isAnalyzed);
Preconditions.checkNotNull(desc);
return desc.getId();
}
@@ -369,7 +367,6 @@ public class SlotRef extends Expr {
@Override
public boolean isBound(SlotId slotId) {
- Preconditions.checkState(isAnalyzed);
return desc.getId().equals(slotId);
}
diff --git
a/fe/fe-core/src/main/java/org/apache/doris/analysis/StringLiteral.java
b/fe/fe-core/src/main/java/org/apache/doris/analysis/StringLiteral.java
index 650162af0bc..98b9a68e0f5 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/analysis/StringLiteral.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/analysis/StringLiteral.java
@@ -51,7 +51,6 @@ public class StringLiteral extends LiteralExpr {
this.value = value;
type = Type.VARCHAR;
this.nullable = false;
- analysisDone();
}
protected StringLiteral(StringLiteral other) {
diff --git
a/fe/fe-core/src/main/java/org/apache/doris/analysis/TimeV2Literal.java
b/fe/fe-core/src/main/java/org/apache/doris/analysis/TimeV2Literal.java
index bdb45793a61..c1638141c61 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/analysis/TimeV2Literal.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/analysis/TimeV2Literal.java
@@ -63,7 +63,6 @@ public class TimeV2Literal extends LiteralExpr {
throw new AnalysisException("time literal is out of range
[-838:59:59.999999, 838:59:59.999999]");
}
this.nullable = false;
- analysisDone();
}
protected TimeV2Literal(TimeV2Literal other) {
diff --git
a/fe/fe-core/src/main/java/org/apache/doris/analysis/VarBinaryLiteral.java
b/fe/fe-core/src/main/java/org/apache/doris/analysis/VarBinaryLiteral.java
index f341d55ffe7..81223cc34d0 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/analysis/VarBinaryLiteral.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/analysis/VarBinaryLiteral.java
@@ -49,7 +49,6 @@ public class VarBinaryLiteral extends LiteralExpr {
this.value = value;
this.type = Type.VARBINARY;
this.nullable = false;
- analysisDone();
}
protected VarBinaryLiteral(VarBinaryLiteral other) {
diff --git
a/fe/fe-core/src/main/java/org/apache/doris/planner/OlapTableSink.java
b/fe/fe-core/src/main/java/org/apache/doris/planner/OlapTableSink.java
index 453e3005c65..a84c14083cc 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/planner/OlapTableSink.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/planner/OlapTableSink.java
@@ -673,7 +673,6 @@ public class OlapTableSink extends DataSink {
// set start keys. min value is a REAL value. should be legal.
if (range.hasLowerBound() && !range.lowerEndpoint().isMinValue()) {
for (int i = 0; i < partColNum; i++) {
- range.lowerEndpoint().getKeys().get(i).setNullable(false);
tPartition.addToStartKeys(range.lowerEndpoint().getKeys().get(i).treeToThrift().getNodes().get(0));
}
}
@@ -682,7 +681,6 @@ public class OlapTableSink extends DataSink {
// see VOlapTablePartition's ctor in tablet_info.h
if (range.hasUpperBound() && !range.upperEndpoint().isMaxValue()) {
for (int i = 0; i < partColNum; i++) {
- range.upperEndpoint().getKeys().get(i).setNullable(false);
tPartition.addToEndKeys(range.upperEndpoint().getKeys().get(i).treeToThrift().getNodes().get(0));
}
}
@@ -696,7 +694,6 @@ public class OlapTableSink extends DataSink {
if (literalExpr.isNullLiteral()) {
tExprNodes.add(NullLiteral.create(literalExpr.getType()).treeToThrift().getNodes().get(0));
} else {
- literalExpr.setNullable(false);
tExprNodes.add(literalExpr.treeToThrift().getNodes().get(0));
}
}
diff --git
a/fe/fe-core/src/test/java/org/apache/doris/analysis/SearchPredicateTest.java
b/fe/fe-core/src/test/java/org/apache/doris/analysis/SearchPredicateTest.java
index ea723c90422..65c6a750766 100644
---
a/fe/fe-core/src/test/java/org/apache/doris/analysis/SearchPredicateTest.java
+++
b/fe/fe-core/src/test/java/org/apache/doris/analysis/SearchPredicateTest.java
@@ -53,11 +53,6 @@ public class SearchPredicateTest {
typeField.setAccessible(true);
typeField.set(slotRef, Type.STRING);
- // Set analyzed flag to true from parent class Expr
- java.lang.reflect.Field analyzedField =
Expr.class.getDeclaredField("isAnalyzed");
- analyzedField.setAccessible(true);
- analyzedField.set(slotRef, true);
-
// Create a mock SlotDescriptor and set it
java.lang.reflect.Field descField =
SlotRef.class.getDeclaredField("desc");
descField.setAccessible(true);
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]