This is an automated email from the ASF dual-hosted git repository.
yiguolei pushed a commit to branch dev-1.1.2
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/dev-1.1.2 by this push:
new 170356ce11 add changeSlotToNullableOfOuterJoinedTuples method (#12040)
170356ce11 is described below
commit 170356ce11be4d4ace4f038eb0ced130fe4e7f07
Author: starocean999 <[email protected]>
AuthorDate: Wed Aug 24 15:00:38 2022 +0800
add changeSlotToNullableOfOuterJoinedTuples method (#12040)
---
.../java/org/apache/doris/analysis/Analyzer.java | 26 ++++++++++++++++++++++
1 file changed, 26 insertions(+)
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 3c62fa6112..488d234e7b 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
@@ -2266,4 +2266,30 @@ public class Analyzer {
}
}
}
+
+ /**
+ * Change all outer joined slots to nullable
+ * Returns the slots actually be changed from not nullable to nullable
+ */
+ public List<SlotDescriptor> changeSlotToNullableOfOuterJoinedTuples() {
+ List<SlotDescriptor> result = new ArrayList<>();
+ for (TupleId id : globalState.outerJoinedTupleIds.keySet()) {
+ TupleDescriptor tupleDescriptor =
globalState.descTbl.getTupleDesc(id);
+ if (tupleDescriptor != null) {
+ for (SlotDescriptor desc : tupleDescriptor.getSlots()) {
+ if (!desc.getIsNullable()) {
+ desc.setIsNullable(true);
+ result.add(desc);
+ }
+ }
+ }
+ }
+ return result;
+ }
+
+ public void changeSlotsToNotNullable(List<SlotDescriptor> slots) {
+ for (SlotDescriptor slot : slots) {
+ slot.setIsNullable(false);
+ }
+ }
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]