Repository: incubator-hivemall
Updated Branches:
  refs/heads/JIRA-22/pr-285 [created] 05766432c
  refs/heads/JIRA-22/pr-304 [created] 775ae4f79
  refs/heads/JIRA-22/pr-336 [created] f8d152cba
  refs/heads/JIRA-22/pr-356 [created] bb3250448
  refs/heads/JIRA-22/pr-385 [created] 4c8dcbfcd


add HiveUtils.isNumberListOI



Project: http://git-wip-us.apache.org/repos/asf/incubator-hivemall/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-hivemall/commit/2dc176a7
Tree: http://git-wip-us.apache.org/repos/asf/incubator-hivemall/tree/2dc176a7
Diff: http://git-wip-us.apache.org/repos/asf/incubator-hivemall/diff/2dc176a7

Branch: refs/heads/JIRA-22/pr-385
Commit: 2dc176a760b553214624e98f885a719ee196cc4e
Parents: 5a7df55
Author: amaya <g...@sapphire.in.net>
Authored: Fri Sep 16 15:46:44 2016 +0900
Committer: amaya <g...@sapphire.in.net>
Committed: Fri Sep 16 15:46:44 2016 +0900

----------------------------------------------------------------------
 core/src/main/java/hivemall/utils/hadoop/HiveUtils.java | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-hivemall/blob/2dc176a7/core/src/main/java/hivemall/utils/hadoop/HiveUtils.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/hivemall/utils/hadoop/HiveUtils.java 
b/core/src/main/java/hivemall/utils/hadoop/HiveUtils.java
index 4628ce1..32b60d0 100644
--- a/core/src/main/java/hivemall/utils/hadoop/HiveUtils.java
+++ b/core/src/main/java/hivemall/utils/hadoop/HiveUtils.java
@@ -189,8 +189,7 @@ public final class HiveUtils {
         return BOOLEAN_TYPE_NAME.equals(typeName);
     }
 
-    public static boolean isNumberOI(@Nonnull final ObjectInspector argOI)
-            throws UDFArgumentTypeException {
+    public static boolean isNumberOI(@Nonnull final ObjectInspector argOI) {
         if (argOI.getCategory() != Category.PRIMITIVE) {
             return false;
         }
@@ -231,6 +230,10 @@ public final class HiveUtils {
         return category == Category.LIST;
     }
 
+    public static boolean isNumberListOI(@Nonnull final ObjectInspector oi){
+        return isListOI(oi) && 
isNumberOI(((ListObjectInspector)oi).getListElementObjectInspector());
+    }
+
     public static boolean isPrimitiveTypeInfo(@Nonnull TypeInfo typeInfo) {
         return typeInfo.getCategory() == ObjectInspector.Category.PRIMITIVE;
     }

Reply via email to