You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@asterixdb.apache.org by ht...@apache.org on 2019/05/29 16:19:31 UTC
[asterixdb] branch master updated: [NO ISSUE][FUN] Bitwise - adjust
type "any" behavior
This is an automated email from the ASF dual-hosted git repository.
htowaileb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/asterixdb.git
The following commit(s) were added to refs/heads/master by this push:
new 0d94955 [NO ISSUE][FUN] Bitwise - adjust type "any" behavior
0d94955 is described below
commit 0d94955228623e88894e0119a5496599720ed080
Author: Hussain Towaileb <Hu...@Couchbase.com>
AuthorDate: Wed May 29 14:46:00 2019 +0300
[NO ISSUE][FUN] Bitwise - adjust type "any" behavior
- user model changes: no
- storage format changes: no
- interface changes: no
Details:
- AbstractResultTypeComputer is handling wrapping the output
in case of any, no need to return a nullable in case of any,
just return the type we're expecting.
Change-Id: I93e002531812ac26fe70e573db1467ea52b9920a
Reviewed-on: https://asterix-gerrit.ics.uci.edu/3409
Contrib: Jenkins <je...@fulliautomatix.ics.uci.edu>
Tested-by: Jenkins <je...@fulliautomatix.ics.uci.edu>
Integration-Tests: Jenkins <je...@fulliautomatix.ics.uci.edu>
Reviewed-by: Dmitry Lychagin <dm...@couchbase.com>
---
.../asterix/om/typecomputer/impl/BitMultipleValuesTypeComputer.java | 2 +-
.../om/typecomputer/impl/BitValuePositionFlagTypeComputer.java | 6 ++----
2 files changed, 3 insertions(+), 5 deletions(-)
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/BitMultipleValuesTypeComputer.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/BitMultipleValuesTypeComputer.java
index 3117fba..a18253a 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/BitMultipleValuesTypeComputer.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/BitMultipleValuesTypeComputer.java
@@ -73,10 +73,10 @@ public class BitMultipleValuesTypeComputer extends AbstractResultTypeComputer {
case SMALLINT:
case INTEGER:
case BIGINT:
+ case ANY:
continue;
case FLOAT:
case DOUBLE:
- case ANY:
isReturnNullable = true;
continue;
default:
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/BitValuePositionFlagTypeComputer.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/BitValuePositionFlagTypeComputer.java
index 3e3256a..1c5a746 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/BitValuePositionFlagTypeComputer.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/BitValuePositionFlagTypeComputer.java
@@ -93,10 +93,10 @@ public class BitValuePositionFlagTypeComputer extends AbstractResultTypeComputer
case SMALLINT:
case INTEGER:
case BIGINT:
+ case ANY:
break;
case FLOAT:
case DOUBLE:
- case ANY:
isReturnNullable = true;
break;
default:
@@ -109,10 +109,10 @@ public class BitValuePositionFlagTypeComputer extends AbstractResultTypeComputer
case SMALLINT:
case INTEGER:
case BIGINT:
+ case ANY:
break;
case FLOAT:
case DOUBLE:
- case ANY:
isReturnNullable = true;
break;
case ARRAY:
@@ -148,9 +148,7 @@ public class BitValuePositionFlagTypeComputer extends AbstractResultTypeComputer
IAType thirdArgument = strippedInputTypes[2];
switch (thirdArgument.getTypeTag()) {
case BOOLEAN:
- break;
case ANY:
- isReturnNullable = true;
break;
default:
return BuiltinType.ANULL;