Github user jihoonson commented on a diff in the pull request:
https://github.com/apache/tajo/pull/579#discussion_r35288012
--- Diff:
tajo-storage/tajo-storage-hdfs/src/main/java/org/apache/tajo/storage/orc/ORCScanner.java
---
@@ -0,0 +1,323 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.tajo.storage.orc;
+
+import com.google.protobuf.InvalidProtocolBufferException;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.hadoop.conf.Configuration;
+import org.apache.hadoop.fs.FSDataInputStream;
+import org.apache.hadoop.fs.FileSystem;
+import org.apache.hadoop.fs.Path;
+import org.apache.tajo.catalog.Schema;
+import org.apache.tajo.catalog.TableMeta;
+import org.apache.tajo.common.TajoDataTypes;
+import org.apache.tajo.conf.TajoConf;
+import org.apache.tajo.datum.*;
+import org.apache.tajo.exception.UnsupportedException;
+import org.apache.tajo.plan.expr.EvalNode;
+import org.apache.tajo.storage.FileScanner;
+import org.apache.tajo.storage.StorageConstants;
+import org.apache.tajo.storage.Tuple;
+import org.apache.tajo.storage.VTuple;
+import org.apache.tajo.storage.fragment.Fragment;
+import com.facebook.presto.orc.*;
+import com.facebook.presto.orc.metadata.OrcMetadataReader;
+import org.apache.tajo.storage.thirdparty.orc.HdfsOrcDataSource;
+import org.apache.tajo.util.datetime.DateTimeUtil;
+import org.joda.time.DateTimeZone;
+
+import java.io.IOException;
+import java.util.HashSet;
+import java.util.Set;
+
+/**
+ * OrcScanner for reading ORC files
+ */
+public class ORCScanner extends FileScanner {
+ private static final Log LOG = LogFactory.getLog(ORCScanner.class);
+ private OrcRecordReader recordReader;
+ private Vector [] vectors;
+ private int currentPosInBatch = 0;
+ private int batchSize = 0;
+
+ public ORCScanner(Configuration conf, final Schema schema, final
TableMeta meta, final Fragment fragment) {
+ super(conf, schema, meta, fragment);
+ }
+
+ private Vector createOrcVector(TajoDataTypes.DataType type) {
+ switch (type.getType()) {
+ case INT1: case INT2: case INT4: case INT8:
+ case INET4:
+ case TIMESTAMP:
+ case DATE:
+ return new LongVector();
+
+ case FLOAT4:
+ case FLOAT8:
+ return new DoubleVector();
+
+ case BOOLEAN:
+ case NULL_TYPE:
+ return new BooleanVector();
+
+ case BLOB:
+ case TEXT:
+ case CHAR:
+ case PROTOBUF:
+ return new SliceVector();
+
+ default:
+ throw new UnsupportedException("This data type is not supported
currently: "+type.toString());
--- End diff --
According to the recent changes in
https://issues.apache.org/jira/browse/TAJO-1625, ```UmimplementedException```
looks more approprite.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---