Dmitry Lychagin has submitted this change and it was merged. Change subject: [ASTERIXDB-2445][COMP] Nullable category handling in TypeComputeUtils.getResultType() ......................................................................
[ASTERIXDB-2445][COMP] Nullable category handling in TypeComputeUtils.getResultType() - user model changes: no - storage format changes: no - interface changes: no Details: - TypeComputeUtils.getResultType() currently makes the output type unknownable when nullable category is passed. It should make it nullable instead Change-Id: I0bb1e96c5a4f83a3d281811246da183d1a31e0f1 Reviewed-on: https://asterix-gerrit.ics.uci.edu/2932 Sonar-Qube: Jenkins <[email protected]> Tested-by: Jenkins <[email protected]> Contrib: Jenkins <[email protected]> Integration-Tests: Jenkins <[email protected]> Reviewed-by: abdullah alamoudi <[email protected]> --- M asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/TypeComputeUtils.java 1 file changed, 3 insertions(+), 2 deletions(-) Approvals: Anon. E. Moose #1000171: abdullah alamoudi: Looks good to me, approved Jenkins: Verified; No violations found; ; Verified diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/TypeComputeUtils.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/TypeComputeUtils.java index 448ab4c..f1f1be3 100644 --- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/TypeComputeUtils.java +++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/TypeComputeUtils.java @@ -168,8 +168,9 @@ } IAType resultType = type; if ((category & NULLABLE) != 0 || (category & NULL) != 0) { - resultType = AUnionType.createUnknownableType(resultType); - } else if ((category & MISSABLE) != 0 || (category & MISSING) != 0) { + resultType = AUnionType.createNullableType(resultType); + } + if ((category & MISSABLE) != 0 || (category & MISSING) != 0) { resultType = AUnionType.createMissableType(resultType); } return resultType; -- To view, visit https://asterix-gerrit.ics.uci.edu/2932 To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings Gerrit-MessageType: merged Gerrit-Change-Id: I0bb1e96c5a4f83a3d281811246da183d1a31e0f1 Gerrit-PatchSet: 3 Gerrit-Project: asterixdb Gerrit-Branch: master Gerrit-Owner: Dmitry Lychagin <[email protected]> Gerrit-Reviewer: Anon. E. Moose #1000171 Gerrit-Reviewer: Dmitry Lychagin <[email protected]> Gerrit-Reviewer: Jenkins <[email protected]> Gerrit-Reviewer: abdullah alamoudi <[email protected]>
