tajo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hyun...@apache.org
Subject git commit: TAJO-984: Improve the default data type handling in RowStoreUtil. (jihoon via hyunsik)
Date Mon, 18 Aug 2014 10:03:12 GMT
Repository: tajo
Updated Branches:
  refs/heads/master 96b6c2aad -> d3697d763


TAJO-984: Improve the default data type handling in RowStoreUtil. (jihoon via hyunsik)


Project: http://git-wip-us.apache.org/repos/asf/tajo/repo
Commit: http://git-wip-us.apache.org/repos/asf/tajo/commit/d3697d76
Tree: http://git-wip-us.apache.org/repos/asf/tajo/tree/d3697d76
Diff: http://git-wip-us.apache.org/repos/asf/tajo/diff/d3697d76

Branch: refs/heads/master
Commit: d3697d7633d6be9fd1f0d29182bf83dda11a2cab
Parents: 96b6c2a
Author: Hyunsik Choi <hyunsik@apache.org>
Authored: Mon Aug 18 19:02:02 2014 +0900
Committer: Hyunsik Choi <hyunsik@apache.org>
Committed: Mon Aug 18 19:02:02 2014 +0900

----------------------------------------------------------------------
 CHANGES                                                      | 3 +++
 .../src/main/java/org/apache/tajo/storage/RowStoreUtil.java  | 8 +++++++-
 2 files changed, 10 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tajo/blob/d3697d76/CHANGES
----------------------------------------------------------------------
diff --git a/CHANGES b/CHANGES
index 17d87ce..f77b19b 100644
--- a/CHANGES
+++ b/CHANGES
@@ -29,6 +29,9 @@ Release 0.9.0 - unreleased
 
   IMPROVEMENT
 
+    TAJO-984: Improve the default data type handling in RowStoreUtil.
+    (jihoon via hyunsik)
+
     TAJO-895: ConstEval should not be included in target list of projectable 
     nodes. (hyunsik)
 

http://git-wip-us.apache.org/repos/asf/tajo/blob/d3697d76/tajo-storage/src/main/java/org/apache/tajo/storage/RowStoreUtil.java
----------------------------------------------------------------------
diff --git a/tajo-storage/src/main/java/org/apache/tajo/storage/RowStoreUtil.java b/tajo-storage/src/main/java/org/apache/tajo/storage/RowStoreUtil.java
index dc453a9..70044ca 100644
--- a/tajo-storage/src/main/java/org/apache/tajo/storage/RowStoreUtil.java
+++ b/tajo-storage/src/main/java/org/apache/tajo/storage/RowStoreUtil.java
@@ -23,6 +23,8 @@ import org.apache.tajo.catalog.Schema;
 import org.apache.tajo.common.TajoDataTypes;
 import org.apache.tajo.datum.DatumFactory;
 import org.apache.tajo.datum.IntervalDatum;
+import org.apache.tajo.exception.UnsupportedException;
+import org.apache.tajo.storage.exception.UnknownDataTypeException;
 import org.apache.tajo.util.BitArray;
 
 import java.nio.ByteBuffer;
@@ -152,6 +154,9 @@ public class RowStoreUtil {
             break;
           case INET6:
             // TODO - to be implemented
+            throw new UnsupportedException(type.getType().name());
+          default:
+            throw new RuntimeException(new UnknownDataTypeException(type.getType().name()));
         }
       }
       return tuple;
@@ -221,6 +226,7 @@ public class RowStoreUtil {
             break;
           case INET6: bb.put(tuple.get(i).asByteArray()); break;
           default:
+            throw new RuntimeException(new UnknownDataTypeException(col.getDataType().getType().name()));
         }
       }
 
@@ -265,7 +271,7 @@ public class RowStoreUtil {
           case INET4:
           case INET6: size += tuple.get(i).asByteArray().length; break;
           default:
-            size += 4;
+            throw new RuntimeException(new UnknownDataTypeException(col.getDataType().getType().name()));
         }
       }
 


Mime
View raw message