You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@asterixdb.apache.org by dl...@apache.org on 2018/08/28 22:42:56 UTC
asterixdb git commit: [ASTERIXDB-2445][COMP] Nullable category
handling in TypeComputeUtils.getResultType()
Repository: asterixdb
Updated Branches:
refs/heads/master 2498d28f0 -> 37a01ebf8
[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 <je...@fulliautomatix.ics.uci.edu>
Tested-by: Jenkins <je...@fulliautomatix.ics.uci.edu>
Contrib: Jenkins <je...@fulliautomatix.ics.uci.edu>
Integration-Tests: Jenkins <je...@fulliautomatix.ics.uci.edu>
Reviewed-by: abdullah alamoudi <ba...@gmail.com>
Project: http://git-wip-us.apache.org/repos/asf/asterixdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/asterixdb/commit/37a01ebf
Tree: http://git-wip-us.apache.org/repos/asf/asterixdb/tree/37a01ebf
Diff: http://git-wip-us.apache.org/repos/asf/asterixdb/diff/37a01ebf
Branch: refs/heads/master
Commit: 37a01ebf896724e7aea63041c72b9c4a534ff847
Parents: 2498d28
Author: Dmitry Lychagin <dm...@couchbase.com>
Authored: Mon Aug 27 16:00:31 2018 -0700
Committer: Dmitry Lychagin <dm...@couchbase.com>
Committed: Tue Aug 28 15:42:31 2018 -0700
----------------------------------------------------------------------
.../apache/asterix/om/typecomputer/impl/TypeComputeUtils.java | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/asterixdb/blob/37a01ebf/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/TypeComputeUtils.java
----------------------------------------------------------------------
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 @@ public class TypeComputeUtils {
}
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;