[fix](planner) mark join slot should always be nullable (#25433)
This commit is contained in:
@ -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());
|
||||
|
||||
@ -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()));
|
||||
|
||||
Reference in New Issue
Block a user