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 9b1cdd3230f [fix](planner) mark join slot should always be nullable
(#25433)
9b1cdd3230f is described below
commit 9b1cdd3230fbc506b28e4b69e20b95bed8e6c90d
Author: starocean999 <[email protected]>
AuthorDate: Tue Oct 17 19:14:13 2023 +0800
[fix](planner) mark join slot should always be nullable (#25433)
---
fe/fe-core/src/main/java/org/apache/doris/analysis/Analyzer.java | 5 ++++-
fe/fe-core/src/main/java/org/apache/doris/analysis/StmtRewriter.java | 2 +-
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/fe/fe-core/src/main/java/org/apache/doris/analysis/Analyzer.java
b/fe/fe-core/src/main/java/org/apache/doris/analysis/Analyzer.java
index e3e81963797..e93d622df5d 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/analysis/Analyzer.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/analysis/Analyzer.java
@@ -994,7 +994,10 @@ public class Analyzer {
newTblName == null ? "table
list" : newTblName.toString());
}
- Column col = d.getTable() == null ? new Column(colName,
ScalarType.BOOLEAN) : d.getTable().getColumn(colName);
+ Column col = (d.getTable() == null)
+ ? new Column(colName, ScalarType.BOOLEAN,
+ globalState.markTuples.get(d.getAlias()) != null)
+ : d.getTable().getColumn(colName);
if (col == null) {
ErrorReport.reportAnalysisException(ErrorCode.ERR_BAD_FIELD_ERROR,
colName,
newTblName == null ?
d.getTable().getName() : newTblName.toString());
diff --git
a/fe/fe-core/src/main/java/org/apache/doris/analysis/StmtRewriter.java
b/fe/fe-core/src/main/java/org/apache/doris/analysis/StmtRewriter.java
index 6e3ec2b50c8..d80328683dd 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/analysis/StmtRewriter.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/analysis/StmtRewriter.java
@@ -529,7 +529,7 @@ public class StmtRewriter {
String slotName = stmt.getColumnAliasGenerator().getNextAlias();
markSlot.setType(ScalarType.BOOLEAN);
markSlot.setIsMaterialized(true);
- markSlot.setIsNullable(false);
+ markSlot.setIsNullable(true);
markSlot.setColumn(new Column(slotName, ScalarType.BOOLEAN));
SlotRef markRef = new SlotRef(markSlot);
markRef.setTblName(new TableName(null, null,
markTuple.getAlias()));
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]