sunchao commented on a change in pull request #2276:
URL: https://github.com/apache/hive/pull/2276#discussion_r632796159
##########
File path:
ql/src/test/org/apache/hadoop/hive/ql/io/parquet/VectorizedColumnReaderTestBase.java
##########
@@ -372,6 +374,35 @@ protected void longRead(boolean isDictionaryEncoding)
throws Exception {
}
}
+ protected void dateRead(boolean isDictionaryEncoding) throws
InterruptedException, HiveException, IOException {
+ Configuration conf = new Configuration();
+ conf.set(IOConstants.COLUMNS,"date_field");
+ conf.set(IOConstants.COLUMNS_TYPES,"date");
+ conf.setBoolean(ColumnProjectionUtils.READ_ALL_COLUMNS, false);
+ conf.set(ColumnProjectionUtils.READ_COLUMN_IDS_CONF_STR, "0");
+ VectorizedParquetRecordReader reader =
+ createParquetReader("message test { required int date_field;}",
conf);
+ VectorizedRowBatch previous = reader.createValue();
+ try {
+ int c = 0;
+ while (reader.next(NullWritable.get(), previous)) {
+ LongColumnVector vector = (LongColumnVector) previous.cols[0];
+ assertTrue(vector.noNulls);
+ for (int i = 0; i < vector.vector.length; i++) {
+ if(c == nElements){
Review comment:
nit: space after `if`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]