Review Board 1.7.22


Vectorized Timestamp functions for long nanosecond based timestamps

Review Request #11530 - Created May 29, 2013 and updated

Gopal V
vectorization
HIVE-4608
Reviewers
hive
hanson5b, jitendra
hive-git
Timestamp UDFs for vectorized long nanosecond timestamps - all of them convert timestamp into a corresponding long/int value (year, month, week-of-year, day-of-month, hour, minute, second, unix-timestamp).
Unit tests included which compare each UDF against its non-vectorized one's output, with random data and year boundary data (+1,0,-1).
ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/VectorUDFDayOfMonthLong.java
New File
[20] 18 lines
[+20]
19
package org.apache.hadoop.hive.ql.exec.vector.expressions;
19
package org.apache.hadoop.hive.ql.exec.vector.expressions;
20

    
   
20

   
21
import java.util.Calendar;
21
import java.util.Calendar;
22

    
   
22

   
23

    
   
23

   
24
public class VectorUDFDayOfMonthLong extends VectorUDFTimestampFieldLong {
24
public final class VectorUDFDayOfMonthLong extends VectorUDFTimestampFieldLong {
25

    
   
25

   
26
  VectorUDFDayOfMonthLong(int colNum, int outputColumn) {
26
  VectorUDFDayOfMonthLong(int colNum, int outputColumn) {
27
    super(Calendar.DAY_OF_MONTH, colNum,outputColumn);
27
    super(Calendar.DAY_OF_MONTH, colNum,outputColumn);
28
  }
28
  }
29

    
   
29

   
30
}
30
}
ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/VectorUDFHourLong.java
New File
 
ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/VectorUDFMinuteLong.java
New File
 
ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/VectorUDFMonthLong.java
New File
 
ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/VectorUDFSecondLong.java
New File
 
ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/VectorUDFTimestampFieldLong.java
New File
 
ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/VectorUDFUnixTimeStampLong.java
New File
 
ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/VectorUDFWeekOfYearLong.java
New File
 
ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/VectorUDFYearLong.java
New File
 
ql/src/test/org/apache/hadoop/hive/ql/exec/vector/expressions/TestVectorTimestampExpressions.java
New File
 
  1. ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/VectorUDFDayOfMonthLong.java: Loading...
  2. ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/VectorUDFHourLong.java: Loading...
  3. ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/VectorUDFMinuteLong.java: Loading...
  4. ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/VectorUDFMonthLong.java: Loading...
  5. ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/VectorUDFSecondLong.java: Loading...
  6. ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/VectorUDFTimestampFieldLong.java: Loading...
  7. ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/VectorUDFUnixTimeStampLong.java: Loading...
  8. ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/VectorUDFWeekOfYearLong.java: Loading...
  9. ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/VectorUDFYearLong.java: Loading...
  10. ql/src/test/org/apache/hadoop/hive/ql/exec/vector/expressions/TestVectorTimestampExpressions.java: Loading...