hive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From khorg...@apache.org
Subject [37/38] hive git commit: HIVE-14873: Add UDF for extraction of 'day of week' (Jesus Camacho Rodriguez, reviewed by Ashutosh Chauhan)
Date Thu, 06 Oct 2016 00:19:06 GMT
HIVE-14873: Add UDF for extraction of 'day of week' (Jesus Camacho Rodriguez, reviewed by Ashutosh Chauhan)


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

Branch: refs/heads/repl2
Commit: 59539885725a96cca4b3f0759a5b26e0d8198dc8
Parents: 96bcee86
Author: Jesus Camacho Rodriguez <jcamacho@apache.org>
Authored: Sat Oct 1 09:30:35 2016 +0100
Committer: Jesus Camacho Rodriguez <jcamacho@apache.org>
Committed: Wed Oct 5 17:51:41 2016 +0100

----------------------------------------------------------------------
 .../hadoop/hive/ql/exec/FunctionRegistry.java   |  18 +-
 .../expressions/VectorUDFDayOfWeekDate.java     |  39 +
 .../expressions/VectorUDFDayOfWeekString.java   |  61 ++
 .../VectorUDFDayOfWeekTimestamp.java            |  39 +
 .../hive/ql/optimizer/physical/Vectorizer.java  |   2 +
 .../org/apache/hadoop/hive/ql/parse/HiveLexer.g |   1 +
 .../hadoop/hive/ql/parse/IdentifiersParser.g    |   3 +-
 .../apache/hadoop/hive/ql/udf/UDFDayOfWeek.java | 105 +++
 ql/src/test/queries/clientpositive/extract.q    |   3 +
 .../clientpositive/vectorized_date_funcs.q      |   8 +-
 .../test/results/clientpositive/extract.q.out   |  11 +
 .../llap/vectorized_date_funcs.q.out            | 846 ++++++++++---------
 .../results/clientpositive/show_functions.q.out |   1 +
 .../clientpositive/vectorized_date_funcs.q.out  | 846 ++++++++++---------
 14 files changed, 1139 insertions(+), 844 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hive/blob/59539885/ql/src/java/org/apache/hadoop/hive/ql/exec/FunctionRegistry.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/exec/FunctionRegistry.java b/ql/src/java/org/apache/hadoop/hive/ql/exec/FunctionRegistry.java
index 6b29be1..0dbbc1d 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/exec/FunctionRegistry.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/exec/FunctionRegistry.java
@@ -37,14 +37,6 @@ import org.apache.hadoop.hive.ql.parse.SemanticException;
 import org.apache.hadoop.hive.ql.plan.ExprNodeDesc;
 import org.apache.hadoop.hive.ql.plan.ExprNodeGenericFuncDesc;
 import org.apache.hadoop.hive.ql.session.SessionState;
-import org.apache.hadoop.hive.ql.udf.UDFDateFloorDay;
-import org.apache.hadoop.hive.ql.udf.UDFDateFloorHour;
-import org.apache.hadoop.hive.ql.udf.UDFDateFloorMinute;
-import org.apache.hadoop.hive.ql.udf.UDFDateFloorMonth;
-import org.apache.hadoop.hive.ql.udf.UDFDateFloorQuarter;
-import org.apache.hadoop.hive.ql.udf.UDFDateFloorSecond;
-import org.apache.hadoop.hive.ql.udf.UDFDateFloorWeek;
-import org.apache.hadoop.hive.ql.udf.UDFDateFloorYear;
 import org.apache.hadoop.hive.ql.udf.SettableUDF;
 import org.apache.hadoop.hive.ql.udf.UDAFPercentile;
 import org.apache.hadoop.hive.ql.udf.UDFAcos;
@@ -57,7 +49,16 @@ import org.apache.hadoop.hive.ql.udf.UDFChr;
 import org.apache.hadoop.hive.ql.udf.UDFConv;
 import org.apache.hadoop.hive.ql.udf.UDFCos;
 import org.apache.hadoop.hive.ql.udf.UDFCrc32;
+import org.apache.hadoop.hive.ql.udf.UDFDateFloorDay;
+import org.apache.hadoop.hive.ql.udf.UDFDateFloorHour;
+import org.apache.hadoop.hive.ql.udf.UDFDateFloorMinute;
+import org.apache.hadoop.hive.ql.udf.UDFDateFloorMonth;
+import org.apache.hadoop.hive.ql.udf.UDFDateFloorQuarter;
+import org.apache.hadoop.hive.ql.udf.UDFDateFloorSecond;
+import org.apache.hadoop.hive.ql.udf.UDFDateFloorWeek;
+import org.apache.hadoop.hive.ql.udf.UDFDateFloorYear;
 import org.apache.hadoop.hive.ql.udf.UDFDayOfMonth;
+import org.apache.hadoop.hive.ql.udf.UDFDayOfWeek;
 import org.apache.hadoop.hive.ql.udf.UDFDegrees;
 import org.apache.hadoop.hive.ql.udf.UDFE;
 import org.apache.hadoop.hive.ql.udf.UDFExp;
@@ -283,6 +284,7 @@ public final class FunctionRegistry {
 
     system.registerUDF("day", UDFDayOfMonth.class, false);
     system.registerUDF("dayofmonth", UDFDayOfMonth.class, false);
+    system.registerUDF("dayofweek", UDFDayOfWeek.class, false);
     system.registerUDF("month", UDFMonth.class, false);
     system.registerGenericUDF("quarter", GenericUDFQuarter.class);
     system.registerUDF("year", UDFYear.class, false);

http://git-wip-us.apache.org/repos/asf/hive/blob/59539885/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/VectorUDFDayOfWeekDate.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/VectorUDFDayOfWeekDate.java b/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/VectorUDFDayOfWeekDate.java
new file mode 100644
index 0000000..bd9c480
--- /dev/null
+++ b/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/VectorUDFDayOfWeekDate.java
@@ -0,0 +1,39 @@
+/**
+ * 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.hadoop.hive.ql.exec.vector.expressions;
+
+import java.util.Calendar;
+
+/**
+ * Expression to get day of week.
+ * Extends {@link VectorUDFTimestampFieldDate}
+ */
+public final class VectorUDFDayOfWeekDate extends VectorUDFTimestampFieldDate {
+
+  private static final long serialVersionUID = 1L;
+
+  public VectorUDFDayOfWeekDate(int colNum, int outputColumn) {
+    super(Calendar.DAY_OF_WEEK, colNum, outputColumn);
+  }
+
+  public VectorUDFDayOfWeekDate() {
+    super();
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/hive/blob/59539885/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/VectorUDFDayOfWeekString.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/VectorUDFDayOfWeekString.java b/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/VectorUDFDayOfWeekString.java
new file mode 100644
index 0000000..069d888
--- /dev/null
+++ b/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/VectorUDFDayOfWeekString.java
@@ -0,0 +1,61 @@
+/**
+ * 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.hadoop.hive.ql.exec.vector.expressions;
+
+import java.nio.charset.CharacterCodingException;
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
+import java.util.Calendar;
+import java.util.Date;
+
+import org.apache.hadoop.io.Text;
+
+/**
+ * Expression to get day of week.
+ * Extends {@link VectorUDFTimestampFieldString}
+ */
+public final class VectorUDFDayOfWeekString extends VectorUDFTimestampFieldString {
+
+  private static final long serialVersionUID = 1L;
+
+  private transient final SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");
+  private transient final Calendar calendar = Calendar.getInstance();
+
+  public VectorUDFDayOfWeekString(int colNum, int outputColumn) {
+    super(colNum, outputColumn, -1, -1);
+  }
+
+  public VectorUDFDayOfWeekString() {
+    super();
+  }
+
+  @Override
+  protected long doGetField(byte[] bytes, int start, int length) throws ParseException {
+    Date date = null;
+    try {
+      String decoded = Text.decode(bytes, start, length);
+      date = format.parse(decoded);
+    } catch (CharacterCodingException e) {
+      throw new ParseException(e.getMessage(), 0);
+    }
+    calendar.setTime(date);
+    return calendar.get(Calendar.DAY_OF_WEEK);
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/hive/blob/59539885/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/VectorUDFDayOfWeekTimestamp.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/VectorUDFDayOfWeekTimestamp.java b/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/VectorUDFDayOfWeekTimestamp.java
new file mode 100644
index 0000000..8e7c180
--- /dev/null
+++ b/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/VectorUDFDayOfWeekTimestamp.java
@@ -0,0 +1,39 @@
+/**
+ * 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.hadoop.hive.ql.exec.vector.expressions;
+
+import java.util.Calendar;
+
+/**
+ * Expression to get day of week.
+ * Extends {@link VectorUDFTimestampFieldTimestamp}
+ */
+public final class VectorUDFDayOfWeekTimestamp extends VectorUDFTimestampFieldTimestamp {
+
+  private static final long serialVersionUID = 1L;
+
+  public VectorUDFDayOfWeekTimestamp(int colNum, int outputColumn) {
+    super(Calendar.DAY_OF_WEEK, colNum, outputColumn);
+  }
+
+  public VectorUDFDayOfWeekTimestamp() {
+    super();
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/hive/blob/59539885/ql/src/java/org/apache/hadoop/hive/ql/optimizer/physical/Vectorizer.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/optimizer/physical/Vectorizer.java b/ql/src/java/org/apache/hadoop/hive/ql/optimizer/physical/Vectorizer.java
index 46bdba6..3a179a3 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/optimizer/physical/Vectorizer.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/optimizer/physical/Vectorizer.java
@@ -129,6 +129,7 @@ import org.apache.hadoop.hive.ql.udf.UDFBin;
 import org.apache.hadoop.hive.ql.udf.UDFConv;
 import org.apache.hadoop.hive.ql.udf.UDFCos;
 import org.apache.hadoop.hive.ql.udf.UDFDayOfMonth;
+import org.apache.hadoop.hive.ql.udf.UDFDayOfWeek;
 import org.apache.hadoop.hive.ql.udf.UDFDegrees;
 import org.apache.hadoop.hive.ql.udf.UDFExp;
 import org.apache.hadoop.hive.ql.udf.UDFFromUnixTime;
@@ -265,6 +266,7 @@ public class Vectorizer implements PhysicalPlanResolver {
     supportedGenericUDFs.add(UDFYear.class);
     supportedGenericUDFs.add(UDFMonth.class);
     supportedGenericUDFs.add(UDFDayOfMonth.class);
+    supportedGenericUDFs.add(UDFDayOfWeek.class);
     supportedGenericUDFs.add(UDFHour.class);
     supportedGenericUDFs.add(UDFMinute.class);
     supportedGenericUDFs.add(UDFSecond.class);

http://git-wip-us.apache.org/repos/asf/hive/blob/59539885/ql/src/java/org/apache/hadoop/hive/ql/parse/HiveLexer.g
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/parse/HiveLexer.g b/ql/src/java/org/apache/hadoop/hive/ql/parse/HiveLexer.g
index 58e76c8..5d3fa6a 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/parse/HiveLexer.g
+++ b/ql/src/java/org/apache/hadoop/hive/ql/parse/HiveLexer.g
@@ -307,6 +307,7 @@ KW_QUARTER: 'QUARTER';
 KW_MONTH: 'MONTH';
 KW_WEEK: 'WEEK';
 KW_DAY: 'DAY';
+KW_DOW: 'DAYOFWEEK';
 KW_HOUR: 'HOUR';
 KW_MINUTE: 'MINUTE';
 KW_SECOND: 'SECOND';

http://git-wip-us.apache.org/repos/asf/hive/blob/59539885/ql/src/java/org/apache/hadoop/hive/ql/parse/IdentifiersParser.g
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/parse/IdentifiersParser.g b/ql/src/java/org/apache/hadoop/hive/ql/parse/IdentifiersParser.g
index 04f87b8..4a44173 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/parse/IdentifiersParser.g
+++ b/ql/src/java/org/apache/hadoop/hive/ql/parse/IdentifiersParser.g
@@ -282,6 +282,7 @@ timeQualifiers
     | KW_MONTH -> Identifier["month"]
     | KW_WEEK -> Identifier["weekofyear"]
     | KW_DAY -> Identifier["day"]
+    | KW_DOW -> Identifier["dayofweek"]
     | KW_HOUR -> Identifier["hour"]
     | KW_MINUTE -> Identifier["minute"]
     | KW_SECOND -> Identifier["second"]
@@ -696,7 +697,7 @@ nonReserved
     | KW_CASCADE | KW_CHANGE | KW_CLUSTER | KW_CLUSTERED | KW_CLUSTERSTATUS | KW_COLLECTION | KW_COLUMNS
     | KW_COMMENT | KW_COMPACT | KW_COMPACTIONS | KW_COMPUTE | KW_CONCATENATE | KW_CONTINUE | KW_DATA | KW_DAY
     | KW_DATABASES | KW_DATETIME | KW_DBPROPERTIES | KW_DEFERRED | KW_DEFINED | KW_DELIMITED | KW_DEPENDENCY 
-    | KW_DESC | KW_DIRECTORIES | KW_DIRECTORY | KW_DISABLE | KW_DISTRIBUTE | KW_ELEM_TYPE 
+    | KW_DESC | KW_DIRECTORIES | KW_DIRECTORY | KW_DISABLE | KW_DISTRIBUTE | KW_DOW | KW_ELEM_TYPE 
     | KW_ENABLE | KW_ESCAPED | KW_EXCLUSIVE | KW_EXPLAIN | KW_EXPORT | KW_FIELDS | KW_FILE | KW_FILEFORMAT
     | KW_FIRST | KW_FORMAT | KW_FORMATTED | KW_FUNCTIONS | KW_HOLD_DDLTIME | KW_HOUR | KW_IDXPROPERTIES | KW_IGNORE
     | KW_INDEX | KW_INDEXES | KW_INPATH | KW_INPUTDRIVER | KW_INPUTFORMAT | KW_ITEMS | KW_JAR

http://git-wip-us.apache.org/repos/asf/hive/blob/59539885/ql/src/java/org/apache/hadoop/hive/ql/udf/UDFDayOfWeek.java
----------------------------------------------------------------------
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/udf/UDFDayOfWeek.java b/ql/src/java/org/apache/hadoop/hive/ql/udf/UDFDayOfWeek.java
new file mode 100644
index 0000000..8c3e461
--- /dev/null
+++ b/ql/src/java/org/apache/hadoop/hive/ql/udf/UDFDayOfWeek.java
@@ -0,0 +1,105 @@
+/**
+ * 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.hadoop.hive.ql.udf;
+
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
+import java.util.Calendar;
+import java.util.Date;
+
+import org.apache.hadoop.hive.ql.exec.Description;
+import org.apache.hadoop.hive.ql.exec.UDF;
+import org.apache.hadoop.hive.ql.exec.vector.VectorizedExpressions;
+import org.apache.hadoop.hive.ql.exec.vector.expressions.VectorUDFDayOfWeekDate;
+import org.apache.hadoop.hive.ql.exec.vector.expressions.VectorUDFDayOfWeekString;
+import org.apache.hadoop.hive.ql.exec.vector.expressions.VectorUDFDayOfWeekTimestamp;
+import org.apache.hadoop.hive.ql.udf.generic.NDV;
+import org.apache.hadoop.hive.serde2.io.DateWritable;
+import org.apache.hadoop.hive.serde2.io.TimestampWritable;
+import org.apache.hadoop.io.IntWritable;
+import org.apache.hadoop.io.Text;
+
+/**
+ * UDFDayOfWeek.
+ *
+ */
+@Description(name = "dayofweek",
+    value = "_FUNC_(param) - Returns the day of the week of date/timestamp "
+    + "(1 = Sunday, 2 = Monday, ..., 7 = Saturday)",
+    extended = "param can be one of:\n"
+    + "1. A string in the format of 'yyyy-MM-dd HH:mm:ss' or 'yyyy-MM-dd'.\n"
+    + "2. A date value\n"
+    + "3. A timestamp value"
+    + "Example:\n "
+    + "  > SELECT _FUNC_('2009-07-30') FROM src LIMIT 1;\n" + "  5")
+@VectorizedExpressions({VectorUDFDayOfWeekDate.class, VectorUDFDayOfWeekString.class, VectorUDFDayOfWeekTimestamp.class})
+@NDV(maxNdv = 7)
+public class UDFDayOfWeek extends UDF {
+  private final SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd");
+  private final Calendar calendar = Calendar.getInstance();
+
+  private final IntWritable result = new IntWritable();
+
+  public UDFDayOfWeek() {
+  }
+
+  /**
+   * Get the day of week from a date string.
+   *
+   * @param dateString
+   *          the dateString in the format of "yyyy-MM-dd HH:mm:ss" or
+   *          "yyyy-MM-dd".
+   * @return an int from 1 to 7. null if the dateString is not a valid date
+   *         string.
+   */
+  public IntWritable evaluate(Text dateString) {
+    if (dateString == null) {
+      return null;
+    }
+    try {
+      Date date = formatter.parse(dateString.toString());
+      calendar.setTime(date);
+      result.set(calendar.get(Calendar.DAY_OF_WEEK));
+      return result;
+    } catch (ParseException e) {
+      return null;
+    }
+  }
+
+  public IntWritable evaluate(DateWritable d) {
+    if (d == null) {
+      return null;
+    }
+
+    calendar.setTime(d.get(false)); // Time doesn't matter.
+    result.set(calendar.get(Calendar.DAY_OF_WEEK));
+    return result;
+  }
+
+  public IntWritable evaluate(TimestampWritable t) {
+    if (t == null) {
+      return null;
+    }
+
+    calendar.setTime(t.getTimestamp());
+    result.set(calendar.get(Calendar.DAY_OF_WEEK));
+    return result;
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/hive/blob/59539885/ql/src/test/queries/clientpositive/extract.q
----------------------------------------------------------------------
diff --git a/ql/src/test/queries/clientpositive/extract.q b/ql/src/test/queries/clientpositive/extract.q
index c09574b..70c1267 100644
--- a/ql/src/test/queries/clientpositive/extract.q
+++ b/ql/src/test/queries/clientpositive/extract.q
@@ -30,6 +30,9 @@ from extract_udf;
 select extract(hour from t)
 from extract_udf;
 
+select extract(dayofweek from t)
+from extract_udf;
+
 select extract(week from t)
 from extract_udf;
 

http://git-wip-us.apache.org/repos/asf/hive/blob/59539885/ql/src/test/queries/clientpositive/vectorized_date_funcs.q
----------------------------------------------------------------------
diff --git a/ql/src/test/queries/clientpositive/vectorized_date_funcs.q b/ql/src/test/queries/clientpositive/vectorized_date_funcs.q
index 59df32a..7d7b1cf 100644
--- a/ql/src/test/queries/clientpositive/vectorized_date_funcs.q
+++ b/ql/src/test/queries/clientpositive/vectorized_date_funcs.q
@@ -30,6 +30,7 @@ EXPLAIN SELECT
   month(fl_time),
   day(fl_time),
   dayofmonth(fl_time),
+  dayofweek(fl_time),
   weekofyear(fl_time),
   date(fl_time),
   to_date(fl_time),
@@ -44,6 +45,7 @@ SELECT
   month(fl_time),
   day(fl_time),
   dayofmonth(fl_time),
+  dayofweek(fl_time),
   weekofyear(fl_time),
   date(fl_time),
   to_date(fl_time),
@@ -58,6 +60,7 @@ EXPLAIN SELECT
   month(fl_date),
   day(fl_date),
   dayofmonth(fl_date),
+  dayofweek(fl_date),
   weekofyear(fl_date),
   date(fl_date),
   to_date(fl_date),
@@ -72,6 +75,7 @@ SELECT
   month(fl_date),
   day(fl_date),
   dayofmonth(fl_date),
+  dayofweek(fl_date),
   weekofyear(fl_date),
   date(fl_date),
   to_date(fl_date),
@@ -85,6 +89,7 @@ EXPLAIN SELECT
   month(fl_time) = month(fl_date),
   day(fl_time) = day(fl_date),
   dayofmonth(fl_time) = dayofmonth(fl_date),
+  dayofweek(fl_time) = dayofweek(fl_date),
   weekofyear(fl_time) = weekofyear(fl_date),
   date(fl_time) = date(fl_date),
   to_date(fl_time) = to_date(fl_date),
@@ -99,6 +104,7 @@ SELECT
   month(fl_time) = month(fl_date),
   day(fl_time) = day(fl_date),
   dayofmonth(fl_time) = dayofmonth(fl_date),
+  dayofweek(fl_time) = dayofweek(fl_date),
   weekofyear(fl_time) = weekofyear(fl_date),
   date(fl_time) = date(fl_date),
   to_date(fl_time) = to_date(fl_date),
@@ -142,4 +148,4 @@ SELECT
   count(fl_date),
   count(*)
 FROM date_udf_flight_orc
-ORDER BY c1;
\ No newline at end of file
+ORDER BY c1;

http://git-wip-us.apache.org/repos/asf/hive/blob/59539885/ql/src/test/results/clientpositive/extract.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/extract.q.out b/ql/src/test/results/clientpositive/extract.q.out
index 73c9bc6..aee4427 100644
--- a/ql/src/test/results/clientpositive/extract.q.out
+++ b/ql/src/test/results/clientpositive/extract.q.out
@@ -154,6 +154,17 @@ POSTHOOK: type: QUERY
 POSTHOOK: Input: default@extract_udf
 #### A masked pattern was here ####
 7
+PREHOOK: query: select extract(dayofweek from t)
+from extract_udf
+PREHOOK: type: QUERY
+PREHOOK: Input: default@extract_udf
+#### A masked pattern was here ####
+POSTHOOK: query: select extract(dayofweek from t)
+from extract_udf
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@extract_udf
+#### A masked pattern was here ####
+6
 PREHOOK: query: select extract(week from t)
 from extract_udf
 PREHOOK: type: QUERY

http://git-wip-us.apache.org/repos/asf/hive/blob/59539885/ql/src/test/results/clientpositive/llap/vectorized_date_funcs.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/llap/vectorized_date_funcs.q.out b/ql/src/test/results/clientpositive/llap/vectorized_date_funcs.q.out
index b18da27..f45e730 100644
--- a/ql/src/test/results/clientpositive/llap/vectorized_date_funcs.q.out
+++ b/ql/src/test/results/clientpositive/llap/vectorized_date_funcs.q.out
@@ -209,6 +209,7 @@ PREHOOK: query: EXPLAIN SELECT
   month(fl_time),
   day(fl_time),
   dayofmonth(fl_time),
+  dayofweek(fl_time),
   weekofyear(fl_time),
   date(fl_time),
   to_date(fl_time),
@@ -223,6 +224,7 @@ POSTHOOK: query: EXPLAIN SELECT
   month(fl_time),
   day(fl_time),
   dayofmonth(fl_time),
+  dayofweek(fl_time),
   weekofyear(fl_time),
   date(fl_time),
   to_date(fl_time),
@@ -242,8 +244,8 @@ STAGE PLANS:
         TableScan
           alias: date_udf_flight_orc
           Select Operator
-            expressions: to_unix_timestamp(fl_time) (type: bigint), year(fl_time) (type: int), month(fl_time) (type: int), day(fl_time) (type: int), dayofmonth(fl_time) (type: int), weekofyear(fl_time) (type: int), CAST( fl_time AS DATE) (type: date), to_date(fl_time) (type: date), date_add(fl_time, 2) (type: date), date_sub(fl_time, 2) (type: date), datediff(fl_time, '2000-01-01') (type: int)
-            outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col9, _col10
+            expressions: to_unix_timestamp(fl_time) (type: bigint), year(fl_time) (type: int), month(fl_time) (type: int), day(fl_time) (type: int), dayofmonth(fl_time) (type: int), dayofweek(fl_time) (type: int), weekofyear(fl_time) (type: int), CAST( fl_time AS DATE) (type: date), to_date(fl_time) (type: date), date_add(fl_time, 2) (type: date), date_sub(fl_time, 2) (type: date), datediff(fl_time, '2000-01-01') (type: int)
+            outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col9, _col10, _col11
             ListSink
 
 PREHOOK: query: SELECT
@@ -252,6 +254,7 @@ PREHOOK: query: SELECT
   month(fl_time),
   day(fl_time),
   dayofmonth(fl_time),
+  dayofweek(fl_time),
   weekofyear(fl_time),
   date(fl_time),
   to_date(fl_time),
@@ -268,6 +271,7 @@ POSTHOOK: query: SELECT
   month(fl_time),
   day(fl_time),
   dayofmonth(fl_time),
+  dayofweek(fl_time),
   weekofyear(fl_time),
   date(fl_time),
   to_date(fl_time),
@@ -278,149 +282,150 @@ FROM date_udf_flight_orc
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@date_udf_flight_orc
 #### A masked pattern was here ####
-1287583200	2010	10	20	20	42	2010-10-20	2010-10-20	2010-10-22	2010-10-18	3945
-1287583200	2010	10	20	20	42	2010-10-20	2010-10-20	2010-10-22	2010-10-18	3945
-1287583200	2010	10	20	20	42	2010-10-20	2010-10-20	2010-10-22	2010-10-18	3945
-1287583200	2010	10	20	20	42	2010-10-20	2010-10-20	2010-10-22	2010-10-18	3945
-1287583200	2010	10	20	20	42	2010-10-20	2010-10-20	2010-10-22	2010-10-18	3945
-1287583200	2010	10	20	20	42	2010-10-20	2010-10-20	2010-10-22	2010-10-18	3945
-1287583200	2010	10	20	20	42	2010-10-20	2010-10-20	2010-10-22	2010-10-18	3945
-1287583200	2010	10	20	20	42	2010-10-20	2010-10-20	2010-10-22	2010-10-18	3945
-1287583200	2010	10	20	20	42	2010-10-20	2010-10-20	2010-10-22	2010-10-18	3945
-1287583200	2010	10	20	20	42	2010-10-20	2010-10-20	2010-10-22	2010-10-18	3945
-1287583200	2010	10	20	20	42	2010-10-20	2010-10-20	2010-10-22	2010-10-18	3945
-1287669600	2010	10	21	21	42	2010-10-21	2010-10-21	2010-10-23	2010-10-19	3946
-1287669600	2010	10	21	21	42	2010-10-21	2010-10-21	2010-10-23	2010-10-19	3946
-1287669600	2010	10	21	21	42	2010-10-21	2010-10-21	2010-10-23	2010-10-19	3946
-1287669600	2010	10	21	21	42	2010-10-21	2010-10-21	2010-10-23	2010-10-19	3946
-1287669600	2010	10	21	21	42	2010-10-21	2010-10-21	2010-10-23	2010-10-19	3946
-1287669600	2010	10	21	21	42	2010-10-21	2010-10-21	2010-10-23	2010-10-19	3946
-1287669600	2010	10	21	21	42	2010-10-21	2010-10-21	2010-10-23	2010-10-19	3946
-1287669600	2010	10	21	21	42	2010-10-21	2010-10-21	2010-10-23	2010-10-19	3946
-1287669600	2010	10	21	21	42	2010-10-21	2010-10-21	2010-10-23	2010-10-19	3946
-1287669600	2010	10	21	21	42	2010-10-21	2010-10-21	2010-10-23	2010-10-19	3946
-1287669600	2010	10	21	21	42	2010-10-21	2010-10-21	2010-10-23	2010-10-19	3946
-1287669600	2010	10	21	21	42	2010-10-21	2010-10-21	2010-10-23	2010-10-19	3946
-1287756000	2010	10	22	22	42	2010-10-22	2010-10-22	2010-10-24	2010-10-20	3947
-1287756000	2010	10	22	22	42	2010-10-22	2010-10-22	2010-10-24	2010-10-20	3947
-1287756000	2010	10	22	22	42	2010-10-22	2010-10-22	2010-10-24	2010-10-20	3947
-1287756000	2010	10	22	22	42	2010-10-22	2010-10-22	2010-10-24	2010-10-20	3947
-1287756000	2010	10	22	22	42	2010-10-22	2010-10-22	2010-10-24	2010-10-20	3947
-1287756000	2010	10	22	22	42	2010-10-22	2010-10-22	2010-10-24	2010-10-20	3947
-1287756000	2010	10	22	22	42	2010-10-22	2010-10-22	2010-10-24	2010-10-20	3947
-1287756000	2010	10	22	22	42	2010-10-22	2010-10-22	2010-10-24	2010-10-20	3947
-1287756000	2010	10	22	22	42	2010-10-22	2010-10-22	2010-10-24	2010-10-20	3947
-1287756000	2010	10	22	22	42	2010-10-22	2010-10-22	2010-10-24	2010-10-20	3947
-1287756000	2010	10	22	22	42	2010-10-22	2010-10-22	2010-10-24	2010-10-20	3947
-1287842400	2010	10	23	23	42	2010-10-23	2010-10-23	2010-10-25	2010-10-21	3948
-1287842400	2010	10	23	23	42	2010-10-23	2010-10-23	2010-10-25	2010-10-21	3948
-1287842400	2010	10	23	23	42	2010-10-23	2010-10-23	2010-10-25	2010-10-21	3948
-1287842400	2010	10	23	23	42	2010-10-23	2010-10-23	2010-10-25	2010-10-21	3948
-1287842400	2010	10	23	23	42	2010-10-23	2010-10-23	2010-10-25	2010-10-21	3948
-1287842400	2010	10	23	23	42	2010-10-23	2010-10-23	2010-10-25	2010-10-21	3948
-1287842400	2010	10	23	23	42	2010-10-23	2010-10-23	2010-10-25	2010-10-21	3948
-1287842400	2010	10	23	23	42	2010-10-23	2010-10-23	2010-10-25	2010-10-21	3948
-1287842400	2010	10	23	23	42	2010-10-23	2010-10-23	2010-10-25	2010-10-21	3948
-1287842400	2010	10	23	23	42	2010-10-23	2010-10-23	2010-10-25	2010-10-21	3948
-1287842400	2010	10	23	23	42	2010-10-23	2010-10-23	2010-10-25	2010-10-21	3948
-1287842400	2010	10	23	23	42	2010-10-23	2010-10-23	2010-10-25	2010-10-21	3948
-1287928800	2010	10	24	24	42	2010-10-24	2010-10-24	2010-10-26	2010-10-22	3949
-1287928800	2010	10	24	24	42	2010-10-24	2010-10-24	2010-10-26	2010-10-22	3949
-1287928800	2010	10	24	24	42	2010-10-24	2010-10-24	2010-10-26	2010-10-22	3949
-1287928800	2010	10	24	24	42	2010-10-24	2010-10-24	2010-10-26	2010-10-22	3949
-1287928800	2010	10	24	24	42	2010-10-24	2010-10-24	2010-10-26	2010-10-22	3949
-1287928800	2010	10	24	24	42	2010-10-24	2010-10-24	2010-10-26	2010-10-22	3949
-1287928800	2010	10	24	24	42	2010-10-24	2010-10-24	2010-10-26	2010-10-22	3949
-1287928800	2010	10	24	24	42	2010-10-24	2010-10-24	2010-10-26	2010-10-22	3949
-1287928800	2010	10	24	24	42	2010-10-24	2010-10-24	2010-10-26	2010-10-22	3949
-1287928800	2010	10	24	24	42	2010-10-24	2010-10-24	2010-10-26	2010-10-22	3949
-1287928800	2010	10	24	24	42	2010-10-24	2010-10-24	2010-10-26	2010-10-22	3949
-1287928800	2010	10	24	24	42	2010-10-24	2010-10-24	2010-10-26	2010-10-22	3949
-1288015200	2010	10	25	25	43	2010-10-25	2010-10-25	2010-10-27	2010-10-23	3950
-1288015200	2010	10	25	25	43	2010-10-25	2010-10-25	2010-10-27	2010-10-23	3950
-1288015200	2010	10	25	25	43	2010-10-25	2010-10-25	2010-10-27	2010-10-23	3950
-1288015200	2010	10	25	25	43	2010-10-25	2010-10-25	2010-10-27	2010-10-23	3950
-1288015200	2010	10	25	25	43	2010-10-25	2010-10-25	2010-10-27	2010-10-23	3950
-1288015200	2010	10	25	25	43	2010-10-25	2010-10-25	2010-10-27	2010-10-23	3950
-1288015200	2010	10	25	25	43	2010-10-25	2010-10-25	2010-10-27	2010-10-23	3950
-1288015200	2010	10	25	25	43	2010-10-25	2010-10-25	2010-10-27	2010-10-23	3950
-1288015200	2010	10	25	25	43	2010-10-25	2010-10-25	2010-10-27	2010-10-23	3950
-1288015200	2010	10	25	25	43	2010-10-25	2010-10-25	2010-10-27	2010-10-23	3950
-1288015200	2010	10	25	25	43	2010-10-25	2010-10-25	2010-10-27	2010-10-23	3950
-1288015200	2010	10	25	25	43	2010-10-25	2010-10-25	2010-10-27	2010-10-23	3950
-1288101600	2010	10	26	26	43	2010-10-26	2010-10-26	2010-10-28	2010-10-24	3951
-1288101600	2010	10	26	26	43	2010-10-26	2010-10-26	2010-10-28	2010-10-24	3951
-1288101600	2010	10	26	26	43	2010-10-26	2010-10-26	2010-10-28	2010-10-24	3951
-1288101600	2010	10	26	26	43	2010-10-26	2010-10-26	2010-10-28	2010-10-24	3951
-1288101600	2010	10	26	26	43	2010-10-26	2010-10-26	2010-10-28	2010-10-24	3951
-1288101600	2010	10	26	26	43	2010-10-26	2010-10-26	2010-10-28	2010-10-24	3951
-1288101600	2010	10	26	26	43	2010-10-26	2010-10-26	2010-10-28	2010-10-24	3951
-1288101600	2010	10	26	26	43	2010-10-26	2010-10-26	2010-10-28	2010-10-24	3951
-1288101600	2010	10	26	26	43	2010-10-26	2010-10-26	2010-10-28	2010-10-24	3951
-1288101600	2010	10	26	26	43	2010-10-26	2010-10-26	2010-10-28	2010-10-24	3951
-1288101600	2010	10	26	26	43	2010-10-26	2010-10-26	2010-10-28	2010-10-24	3951
-1288101600	2010	10	26	26	43	2010-10-26	2010-10-26	2010-10-28	2010-10-24	3951
-1288101600	2010	10	26	26	43	2010-10-26	2010-10-26	2010-10-28	2010-10-24	3951
-1288188000	2010	10	27	27	43	2010-10-27	2010-10-27	2010-10-29	2010-10-25	3952
-1288188000	2010	10	27	27	43	2010-10-27	2010-10-27	2010-10-29	2010-10-25	3952
-1288188000	2010	10	27	27	43	2010-10-27	2010-10-27	2010-10-29	2010-10-25	3952
-1288188000	2010	10	27	27	43	2010-10-27	2010-10-27	2010-10-29	2010-10-25	3952
-1288188000	2010	10	27	27	43	2010-10-27	2010-10-27	2010-10-29	2010-10-25	3952
-1288188000	2010	10	27	27	43	2010-10-27	2010-10-27	2010-10-29	2010-10-25	3952
-1288188000	2010	10	27	27	43	2010-10-27	2010-10-27	2010-10-29	2010-10-25	3952
-1288188000	2010	10	27	27	43	2010-10-27	2010-10-27	2010-10-29	2010-10-25	3952
-1288188000	2010	10	27	27	43	2010-10-27	2010-10-27	2010-10-29	2010-10-25	3952
-1288188000	2010	10	27	27	43	2010-10-27	2010-10-27	2010-10-29	2010-10-25	3952
-1288188000	2010	10	27	27	43	2010-10-27	2010-10-27	2010-10-29	2010-10-25	3952
-1288274400	2010	10	28	28	43	2010-10-28	2010-10-28	2010-10-30	2010-10-26	3953
-1288274400	2010	10	28	28	43	2010-10-28	2010-10-28	2010-10-30	2010-10-26	3953
-1288274400	2010	10	28	28	43	2010-10-28	2010-10-28	2010-10-30	2010-10-26	3953
-1288274400	2010	10	28	28	43	2010-10-28	2010-10-28	2010-10-30	2010-10-26	3953
-1288274400	2010	10	28	28	43	2010-10-28	2010-10-28	2010-10-30	2010-10-26	3953
-1288274400	2010	10	28	28	43	2010-10-28	2010-10-28	2010-10-30	2010-10-26	3953
-1288274400	2010	10	28	28	43	2010-10-28	2010-10-28	2010-10-30	2010-10-26	3953
-1288274400	2010	10	28	28	43	2010-10-28	2010-10-28	2010-10-30	2010-10-26	3953
-1288274400	2010	10	28	28	43	2010-10-28	2010-10-28	2010-10-30	2010-10-26	3953
-1288274400	2010	10	28	28	43	2010-10-28	2010-10-28	2010-10-30	2010-10-26	3953
-1288274400	2010	10	28	28	43	2010-10-28	2010-10-28	2010-10-30	2010-10-26	3953
-1288274400	2010	10	28	28	43	2010-10-28	2010-10-28	2010-10-30	2010-10-26	3953
-1288360800	2010	10	29	29	43	2010-10-29	2010-10-29	2010-10-31	2010-10-27	3954
-1288360800	2010	10	29	29	43	2010-10-29	2010-10-29	2010-10-31	2010-10-27	3954
-1288360800	2010	10	29	29	43	2010-10-29	2010-10-29	2010-10-31	2010-10-27	3954
-1288360800	2010	10	29	29	43	2010-10-29	2010-10-29	2010-10-31	2010-10-27	3954
-1288360800	2010	10	29	29	43	2010-10-29	2010-10-29	2010-10-31	2010-10-27	3954
-1288360800	2010	10	29	29	43	2010-10-29	2010-10-29	2010-10-31	2010-10-27	3954
-1288360800	2010	10	29	29	43	2010-10-29	2010-10-29	2010-10-31	2010-10-27	3954
-1288360800	2010	10	29	29	43	2010-10-29	2010-10-29	2010-10-31	2010-10-27	3954
-1288360800	2010	10	29	29	43	2010-10-29	2010-10-29	2010-10-31	2010-10-27	3954
-1288360800	2010	10	29	29	43	2010-10-29	2010-10-29	2010-10-31	2010-10-27	3954
-1288360800	2010	10	29	29	43	2010-10-29	2010-10-29	2010-10-31	2010-10-27	3954
-1288360800	2010	10	29	29	43	2010-10-29	2010-10-29	2010-10-31	2010-10-27	3954
-1288447200	2010	10	30	30	43	2010-10-30	2010-10-30	2010-11-01	2010-10-28	3955
-1288447200	2010	10	30	30	43	2010-10-30	2010-10-30	2010-11-01	2010-10-28	3955
-1288447200	2010	10	30	30	43	2010-10-30	2010-10-30	2010-11-01	2010-10-28	3955
-1288447200	2010	10	30	30	43	2010-10-30	2010-10-30	2010-11-01	2010-10-28	3955
-1288447200	2010	10	30	30	43	2010-10-30	2010-10-30	2010-11-01	2010-10-28	3955
-1288447200	2010	10	30	30	43	2010-10-30	2010-10-30	2010-11-01	2010-10-28	3955
-1288447200	2010	10	30	30	43	2010-10-30	2010-10-30	2010-11-01	2010-10-28	3955
-1288447200	2010	10	30	30	43	2010-10-30	2010-10-30	2010-11-01	2010-10-28	3955
-1288447200	2010	10	30	30	43	2010-10-30	2010-10-30	2010-11-01	2010-10-28	3955
-1288447200	2010	10	30	30	43	2010-10-30	2010-10-30	2010-11-01	2010-10-28	3955
-1288447200	2010	10	30	30	43	2010-10-30	2010-10-30	2010-11-01	2010-10-28	3955
-1288533600	2010	10	31	31	43	2010-10-31	2010-10-31	2010-11-02	2010-10-29	3956
-1288533600	2010	10	31	31	43	2010-10-31	2010-10-31	2010-11-02	2010-10-29	3956
-1288533600	2010	10	31	31	43	2010-10-31	2010-10-31	2010-11-02	2010-10-29	3956
-1288533600	2010	10	31	31	43	2010-10-31	2010-10-31	2010-11-02	2010-10-29	3956
-1288533600	2010	10	31	31	43	2010-10-31	2010-10-31	2010-11-02	2010-10-29	3956
-1288533600	2010	10	31	31	43	2010-10-31	2010-10-31	2010-11-02	2010-10-29	3956
-1288533600	2010	10	31	31	43	2010-10-31	2010-10-31	2010-11-02	2010-10-29	3956
-1288533600	2010	10	31	31	43	2010-10-31	2010-10-31	2010-11-02	2010-10-29	3956
+1287583200	2010	10	20	20	4	42	2010-10-20	2010-10-20	2010-10-22	2010-10-18	3945
+1287583200	2010	10	20	20	4	42	2010-10-20	2010-10-20	2010-10-22	2010-10-18	3945
+1287583200	2010	10	20	20	4	42	2010-10-20	2010-10-20	2010-10-22	2010-10-18	3945
+1287583200	2010	10	20	20	4	42	2010-10-20	2010-10-20	2010-10-22	2010-10-18	3945
+1287583200	2010	10	20	20	4	42	2010-10-20	2010-10-20	2010-10-22	2010-10-18	3945
+1287583200	2010	10	20	20	4	42	2010-10-20	2010-10-20	2010-10-22	2010-10-18	3945
+1287583200	2010	10	20	20	4	42	2010-10-20	2010-10-20	2010-10-22	2010-10-18	3945
+1287583200	2010	10	20	20	4	42	2010-10-20	2010-10-20	2010-10-22	2010-10-18	3945
+1287583200	2010	10	20	20	4	42	2010-10-20	2010-10-20	2010-10-22	2010-10-18	3945
+1287583200	2010	10	20	20	4	42	2010-10-20	2010-10-20	2010-10-22	2010-10-18	3945
+1287583200	2010	10	20	20	4	42	2010-10-20	2010-10-20	2010-10-22	2010-10-18	3945
+1287669600	2010	10	21	21	5	42	2010-10-21	2010-10-21	2010-10-23	2010-10-19	3946
+1287669600	2010	10	21	21	5	42	2010-10-21	2010-10-21	2010-10-23	2010-10-19	3946
+1287669600	2010	10	21	21	5	42	2010-10-21	2010-10-21	2010-10-23	2010-10-19	3946
+1287669600	2010	10	21	21	5	42	2010-10-21	2010-10-21	2010-10-23	2010-10-19	3946
+1287669600	2010	10	21	21	5	42	2010-10-21	2010-10-21	2010-10-23	2010-10-19	3946
+1287669600	2010	10	21	21	5	42	2010-10-21	2010-10-21	2010-10-23	2010-10-19	3946
+1287669600	2010	10	21	21	5	42	2010-10-21	2010-10-21	2010-10-23	2010-10-19	3946
+1287669600	2010	10	21	21	5	42	2010-10-21	2010-10-21	2010-10-23	2010-10-19	3946
+1287669600	2010	10	21	21	5	42	2010-10-21	2010-10-21	2010-10-23	2010-10-19	3946
+1287669600	2010	10	21	21	5	42	2010-10-21	2010-10-21	2010-10-23	2010-10-19	3946
+1287669600	2010	10	21	21	5	42	2010-10-21	2010-10-21	2010-10-23	2010-10-19	3946
+1287669600	2010	10	21	21	5	42	2010-10-21	2010-10-21	2010-10-23	2010-10-19	3946
+1287756000	2010	10	22	22	6	42	2010-10-22	2010-10-22	2010-10-24	2010-10-20	3947
+1287756000	2010	10	22	22	6	42	2010-10-22	2010-10-22	2010-10-24	2010-10-20	3947
+1287756000	2010	10	22	22	6	42	2010-10-22	2010-10-22	2010-10-24	2010-10-20	3947
+1287756000	2010	10	22	22	6	42	2010-10-22	2010-10-22	2010-10-24	2010-10-20	3947
+1287756000	2010	10	22	22	6	42	2010-10-22	2010-10-22	2010-10-24	2010-10-20	3947
+1287756000	2010	10	22	22	6	42	2010-10-22	2010-10-22	2010-10-24	2010-10-20	3947
+1287756000	2010	10	22	22	6	42	2010-10-22	2010-10-22	2010-10-24	2010-10-20	3947
+1287756000	2010	10	22	22	6	42	2010-10-22	2010-10-22	2010-10-24	2010-10-20	3947
+1287756000	2010	10	22	22	6	42	2010-10-22	2010-10-22	2010-10-24	2010-10-20	3947
+1287756000	2010	10	22	22	6	42	2010-10-22	2010-10-22	2010-10-24	2010-10-20	3947
+1287756000	2010	10	22	22	6	42	2010-10-22	2010-10-22	2010-10-24	2010-10-20	3947
+1287842400	2010	10	23	23	7	42	2010-10-23	2010-10-23	2010-10-25	2010-10-21	3948
+1287842400	2010	10	23	23	7	42	2010-10-23	2010-10-23	2010-10-25	2010-10-21	3948
+1287842400	2010	10	23	23	7	42	2010-10-23	2010-10-23	2010-10-25	2010-10-21	3948
+1287842400	2010	10	23	23	7	42	2010-10-23	2010-10-23	2010-10-25	2010-10-21	3948
+1287842400	2010	10	23	23	7	42	2010-10-23	2010-10-23	2010-10-25	2010-10-21	3948
+1287842400	2010	10	23	23	7	42	2010-10-23	2010-10-23	2010-10-25	2010-10-21	3948
+1287842400	2010	10	23	23	7	42	2010-10-23	2010-10-23	2010-10-25	2010-10-21	3948
+1287842400	2010	10	23	23	7	42	2010-10-23	2010-10-23	2010-10-25	2010-10-21	3948
+1287842400	2010	10	23	23	7	42	2010-10-23	2010-10-23	2010-10-25	2010-10-21	3948
+1287842400	2010	10	23	23	7	42	2010-10-23	2010-10-23	2010-10-25	2010-10-21	3948
+1287842400	2010	10	23	23	7	42	2010-10-23	2010-10-23	2010-10-25	2010-10-21	3948
+1287842400	2010	10	23	23	7	42	2010-10-23	2010-10-23	2010-10-25	2010-10-21	3948
+1287928800	2010	10	24	24	1	42	2010-10-24	2010-10-24	2010-10-26	2010-10-22	3949
+1287928800	2010	10	24	24	1	42	2010-10-24	2010-10-24	2010-10-26	2010-10-22	3949
+1287928800	2010	10	24	24	1	42	2010-10-24	2010-10-24	2010-10-26	2010-10-22	3949
+1287928800	2010	10	24	24	1	42	2010-10-24	2010-10-24	2010-10-26	2010-10-22	3949
+1287928800	2010	10	24	24	1	42	2010-10-24	2010-10-24	2010-10-26	2010-10-22	3949
+1287928800	2010	10	24	24	1	42	2010-10-24	2010-10-24	2010-10-26	2010-10-22	3949
+1287928800	2010	10	24	24	1	42	2010-10-24	2010-10-24	2010-10-26	2010-10-22	3949
+1287928800	2010	10	24	24	1	42	2010-10-24	2010-10-24	2010-10-26	2010-10-22	3949
+1287928800	2010	10	24	24	1	42	2010-10-24	2010-10-24	2010-10-26	2010-10-22	3949
+1287928800	2010	10	24	24	1	42	2010-10-24	2010-10-24	2010-10-26	2010-10-22	3949
+1287928800	2010	10	24	24	1	42	2010-10-24	2010-10-24	2010-10-26	2010-10-22	3949
+1287928800	2010	10	24	24	1	42	2010-10-24	2010-10-24	2010-10-26	2010-10-22	3949
+1288015200	2010	10	25	25	2	43	2010-10-25	2010-10-25	2010-10-27	2010-10-23	3950
+1288015200	2010	10	25	25	2	43	2010-10-25	2010-10-25	2010-10-27	2010-10-23	3950
+1288015200	2010	10	25	25	2	43	2010-10-25	2010-10-25	2010-10-27	2010-10-23	3950
+1288015200	2010	10	25	25	2	43	2010-10-25	2010-10-25	2010-10-27	2010-10-23	3950
+1288015200	2010	10	25	25	2	43	2010-10-25	2010-10-25	2010-10-27	2010-10-23	3950
+1288015200	2010	10	25	25	2	43	2010-10-25	2010-10-25	2010-10-27	2010-10-23	3950
+1288015200	2010	10	25	25	2	43	2010-10-25	2010-10-25	2010-10-27	2010-10-23	3950
+1288015200	2010	10	25	25	2	43	2010-10-25	2010-10-25	2010-10-27	2010-10-23	3950
+1288015200	2010	10	25	25	2	43	2010-10-25	2010-10-25	2010-10-27	2010-10-23	3950
+1288015200	2010	10	25	25	2	43	2010-10-25	2010-10-25	2010-10-27	2010-10-23	3950
+1288015200	2010	10	25	25	2	43	2010-10-25	2010-10-25	2010-10-27	2010-10-23	3950
+1288015200	2010	10	25	25	2	43	2010-10-25	2010-10-25	2010-10-27	2010-10-23	3950
+1288101600	2010	10	26	26	3	43	2010-10-26	2010-10-26	2010-10-28	2010-10-24	3951
+1288101600	2010	10	26	26	3	43	2010-10-26	2010-10-26	2010-10-28	2010-10-24	3951
+1288101600	2010	10	26	26	3	43	2010-10-26	2010-10-26	2010-10-28	2010-10-24	3951
+1288101600	2010	10	26	26	3	43	2010-10-26	2010-10-26	2010-10-28	2010-10-24	3951
+1288101600	2010	10	26	26	3	43	2010-10-26	2010-10-26	2010-10-28	2010-10-24	3951
+1288101600	2010	10	26	26	3	43	2010-10-26	2010-10-26	2010-10-28	2010-10-24	3951
+1288101600	2010	10	26	26	3	43	2010-10-26	2010-10-26	2010-10-28	2010-10-24	3951
+1288101600	2010	10	26	26	3	43	2010-10-26	2010-10-26	2010-10-28	2010-10-24	3951
+1288101600	2010	10	26	26	3	43	2010-10-26	2010-10-26	2010-10-28	2010-10-24	3951
+1288101600	2010	10	26	26	3	43	2010-10-26	2010-10-26	2010-10-28	2010-10-24	3951
+1288101600	2010	10	26	26	3	43	2010-10-26	2010-10-26	2010-10-28	2010-10-24	3951
+1288101600	2010	10	26	26	3	43	2010-10-26	2010-10-26	2010-10-28	2010-10-24	3951
+1288101600	2010	10	26	26	3	43	2010-10-26	2010-10-26	2010-10-28	2010-10-24	3951
+1288188000	2010	10	27	27	4	43	2010-10-27	2010-10-27	2010-10-29	2010-10-25	3952
+1288188000	2010	10	27	27	4	43	2010-10-27	2010-10-27	2010-10-29	2010-10-25	3952
+1288188000	2010	10	27	27	4	43	2010-10-27	2010-10-27	2010-10-29	2010-10-25	3952
+1288188000	2010	10	27	27	4	43	2010-10-27	2010-10-27	2010-10-29	2010-10-25	3952
+1288188000	2010	10	27	27	4	43	2010-10-27	2010-10-27	2010-10-29	2010-10-25	3952
+1288188000	2010	10	27	27	4	43	2010-10-27	2010-10-27	2010-10-29	2010-10-25	3952
+1288188000	2010	10	27	27	4	43	2010-10-27	2010-10-27	2010-10-29	2010-10-25	3952
+1288188000	2010	10	27	27	4	43	2010-10-27	2010-10-27	2010-10-29	2010-10-25	3952
+1288188000	2010	10	27	27	4	43	2010-10-27	2010-10-27	2010-10-29	2010-10-25	3952
+1288188000	2010	10	27	27	4	43	2010-10-27	2010-10-27	2010-10-29	2010-10-25	3952
+1288188000	2010	10	27	27	4	43	2010-10-27	2010-10-27	2010-10-29	2010-10-25	3952
+1288274400	2010	10	28	28	5	43	2010-10-28	2010-10-28	2010-10-30	2010-10-26	3953
+1288274400	2010	10	28	28	5	43	2010-10-28	2010-10-28	2010-10-30	2010-10-26	3953
+1288274400	2010	10	28	28	5	43	2010-10-28	2010-10-28	2010-10-30	2010-10-26	3953
+1288274400	2010	10	28	28	5	43	2010-10-28	2010-10-28	2010-10-30	2010-10-26	3953
+1288274400	2010	10	28	28	5	43	2010-10-28	2010-10-28	2010-10-30	2010-10-26	3953
+1288274400	2010	10	28	28	5	43	2010-10-28	2010-10-28	2010-10-30	2010-10-26	3953
+1288274400	2010	10	28	28	5	43	2010-10-28	2010-10-28	2010-10-30	2010-10-26	3953
+1288274400	2010	10	28	28	5	43	2010-10-28	2010-10-28	2010-10-30	2010-10-26	3953
+1288274400	2010	10	28	28	5	43	2010-10-28	2010-10-28	2010-10-30	2010-10-26	3953
+1288274400	2010	10	28	28	5	43	2010-10-28	2010-10-28	2010-10-30	2010-10-26	3953
+1288274400	2010	10	28	28	5	43	2010-10-28	2010-10-28	2010-10-30	2010-10-26	3953
+1288274400	2010	10	28	28	5	43	2010-10-28	2010-10-28	2010-10-30	2010-10-26	3953
+1288360800	2010	10	29	29	6	43	2010-10-29	2010-10-29	2010-10-31	2010-10-27	3954
+1288360800	2010	10	29	29	6	43	2010-10-29	2010-10-29	2010-10-31	2010-10-27	3954
+1288360800	2010	10	29	29	6	43	2010-10-29	2010-10-29	2010-10-31	2010-10-27	3954
+1288360800	2010	10	29	29	6	43	2010-10-29	2010-10-29	2010-10-31	2010-10-27	3954
+1288360800	2010	10	29	29	6	43	2010-10-29	2010-10-29	2010-10-31	2010-10-27	3954
+1288360800	2010	10	29	29	6	43	2010-10-29	2010-10-29	2010-10-31	2010-10-27	3954
+1288360800	2010	10	29	29	6	43	2010-10-29	2010-10-29	2010-10-31	2010-10-27	3954
+1288360800	2010	10	29	29	6	43	2010-10-29	2010-10-29	2010-10-31	2010-10-27	3954
+1288360800	2010	10	29	29	6	43	2010-10-29	2010-10-29	2010-10-31	2010-10-27	3954
+1288360800	2010	10	29	29	6	43	2010-10-29	2010-10-29	2010-10-31	2010-10-27	3954
+1288360800	2010	10	29	29	6	43	2010-10-29	2010-10-29	2010-10-31	2010-10-27	3954
+1288360800	2010	10	29	29	6	43	2010-10-29	2010-10-29	2010-10-31	2010-10-27	3954
+1288447200	2010	10	30	30	7	43	2010-10-30	2010-10-30	2010-11-01	2010-10-28	3955
+1288447200	2010	10	30	30	7	43	2010-10-30	2010-10-30	2010-11-01	2010-10-28	3955
+1288447200	2010	10	30	30	7	43	2010-10-30	2010-10-30	2010-11-01	2010-10-28	3955
+1288447200	2010	10	30	30	7	43	2010-10-30	2010-10-30	2010-11-01	2010-10-28	3955
+1288447200	2010	10	30	30	7	43	2010-10-30	2010-10-30	2010-11-01	2010-10-28	3955
+1288447200	2010	10	30	30	7	43	2010-10-30	2010-10-30	2010-11-01	2010-10-28	3955
+1288447200	2010	10	30	30	7	43	2010-10-30	2010-10-30	2010-11-01	2010-10-28	3955
+1288447200	2010	10	30	30	7	43	2010-10-30	2010-10-30	2010-11-01	2010-10-28	3955
+1288447200	2010	10	30	30	7	43	2010-10-30	2010-10-30	2010-11-01	2010-10-28	3955
+1288447200	2010	10	30	30	7	43	2010-10-30	2010-10-30	2010-11-01	2010-10-28	3955
+1288447200	2010	10	30	30	7	43	2010-10-30	2010-10-30	2010-11-01	2010-10-28	3955
+1288533600	2010	10	31	31	1	43	2010-10-31	2010-10-31	2010-11-02	2010-10-29	3956
+1288533600	2010	10	31	31	1	43	2010-10-31	2010-10-31	2010-11-02	2010-10-29	3956
+1288533600	2010	10	31	31	1	43	2010-10-31	2010-10-31	2010-11-02	2010-10-29	3956
+1288533600	2010	10	31	31	1	43	2010-10-31	2010-10-31	2010-11-02	2010-10-29	3956
+1288533600	2010	10	31	31	1	43	2010-10-31	2010-10-31	2010-11-02	2010-10-29	3956
+1288533600	2010	10	31	31	1	43	2010-10-31	2010-10-31	2010-11-02	2010-10-29	3956
+1288533600	2010	10	31	31	1	43	2010-10-31	2010-10-31	2010-11-02	2010-10-29	3956
+1288533600	2010	10	31	31	1	43	2010-10-31	2010-10-31	2010-11-02	2010-10-29	3956
 PREHOOK: query: EXPLAIN SELECT
   to_unix_timestamp(fl_date),
   year(fl_date),
   month(fl_date),
   day(fl_date),
   dayofmonth(fl_date),
+  dayofweek(fl_date),
   weekofyear(fl_date),
   date(fl_date),
   to_date(fl_date),
@@ -435,6 +440,7 @@ POSTHOOK: query: EXPLAIN SELECT
   month(fl_date),
   day(fl_date),
   dayofmonth(fl_date),
+  dayofweek(fl_date),
   weekofyear(fl_date),
   date(fl_date),
   to_date(fl_date),
@@ -454,8 +460,8 @@ STAGE PLANS:
         TableScan
           alias: date_udf_flight_orc
           Select Operator
-            expressions: to_unix_timestamp(fl_date) (type: bigint), year(fl_date) (type: int), month(fl_date) (type: int), day(fl_date) (type: int), dayofmonth(fl_date) (type: int), weekofyear(fl_date) (type: int), fl_date (type: date), to_date(fl_date) (type: date), date_add(fl_date, 2) (type: date), date_sub(fl_date, 2) (type: date), datediff(fl_date, '2000-01-01') (type: int)
-            outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col9, _col10
+            expressions: to_unix_timestamp(fl_date) (type: bigint), year(fl_date) (type: int), month(fl_date) (type: int), day(fl_date) (type: int), dayofmonth(fl_date) (type: int), dayofweek(fl_date) (type: int), weekofyear(fl_date) (type: int), fl_date (type: date), to_date(fl_date) (type: date), date_add(fl_date, 2) (type: date), date_sub(fl_date, 2) (type: date), datediff(fl_date, '2000-01-01') (type: int)
+            outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col9, _col10, _col11
             ListSink
 
 PREHOOK: query: SELECT
@@ -464,6 +470,7 @@ PREHOOK: query: SELECT
   month(fl_date),
   day(fl_date),
   dayofmonth(fl_date),
+  dayofweek(fl_date),
   weekofyear(fl_date),
   date(fl_date),
   to_date(fl_date),
@@ -480,6 +487,7 @@ POSTHOOK: query: SELECT
   month(fl_date),
   day(fl_date),
   dayofmonth(fl_date),
+  dayofweek(fl_date),
   weekofyear(fl_date),
   date(fl_date),
   to_date(fl_date),
@@ -490,148 +498,149 @@ FROM date_udf_flight_orc
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@date_udf_flight_orc
 #### A masked pattern was here ####
-1287558000	2010	10	20	20	42	2010-10-20	2010-10-20	2010-10-22	2010-10-18	3945
-1287558000	2010	10	20	20	42	2010-10-20	2010-10-20	2010-10-22	2010-10-18	3945
-1287558000	2010	10	20	20	42	2010-10-20	2010-10-20	2010-10-22	2010-10-18	3945
-1287558000	2010	10	20	20	42	2010-10-20	2010-10-20	2010-10-22	2010-10-18	3945
-1287558000	2010	10	20	20	42	2010-10-20	2010-10-20	2010-10-22	2010-10-18	3945
-1287558000	2010	10	20	20	42	2010-10-20	2010-10-20	2010-10-22	2010-10-18	3945
-1287558000	2010	10	20	20	42	2010-10-20	2010-10-20	2010-10-22	2010-10-18	3945
-1287558000	2010	10	20	20	42	2010-10-20	2010-10-20	2010-10-22	2010-10-18	3945
-1287558000	2010	10	20	20	42	2010-10-20	2010-10-20	2010-10-22	2010-10-18	3945
-1287558000	2010	10	20	20	42	2010-10-20	2010-10-20	2010-10-22	2010-10-18	3945
-1287558000	2010	10	20	20	42	2010-10-20	2010-10-20	2010-10-22	2010-10-18	3945
-1287644400	2010	10	21	21	42	2010-10-21	2010-10-21	2010-10-23	2010-10-19	3946
-1287644400	2010	10	21	21	42	2010-10-21	2010-10-21	2010-10-23	2010-10-19	3946
-1287644400	2010	10	21	21	42	2010-10-21	2010-10-21	2010-10-23	2010-10-19	3946
-1287644400	2010	10	21	21	42	2010-10-21	2010-10-21	2010-10-23	2010-10-19	3946
-1287644400	2010	10	21	21	42	2010-10-21	2010-10-21	2010-10-23	2010-10-19	3946
-1287644400	2010	10	21	21	42	2010-10-21	2010-10-21	2010-10-23	2010-10-19	3946
-1287644400	2010	10	21	21	42	2010-10-21	2010-10-21	2010-10-23	2010-10-19	3946
-1287644400	2010	10	21	21	42	2010-10-21	2010-10-21	2010-10-23	2010-10-19	3946
-1287644400	2010	10	21	21	42	2010-10-21	2010-10-21	2010-10-23	2010-10-19	3946
-1287644400	2010	10	21	21	42	2010-10-21	2010-10-21	2010-10-23	2010-10-19	3946
-1287644400	2010	10	21	21	42	2010-10-21	2010-10-21	2010-10-23	2010-10-19	3946
-1287644400	2010	10	21	21	42	2010-10-21	2010-10-21	2010-10-23	2010-10-19	3946
-1287730800	2010	10	22	22	42	2010-10-22	2010-10-22	2010-10-24	2010-10-20	3947
-1287730800	2010	10	22	22	42	2010-10-22	2010-10-22	2010-10-24	2010-10-20	3947
-1287730800	2010	10	22	22	42	2010-10-22	2010-10-22	2010-10-24	2010-10-20	3947
-1287730800	2010	10	22	22	42	2010-10-22	2010-10-22	2010-10-24	2010-10-20	3947
-1287730800	2010	10	22	22	42	2010-10-22	2010-10-22	2010-10-24	2010-10-20	3947
-1287730800	2010	10	22	22	42	2010-10-22	2010-10-22	2010-10-24	2010-10-20	3947
-1287730800	2010	10	22	22	42	2010-10-22	2010-10-22	2010-10-24	2010-10-20	3947
-1287730800	2010	10	22	22	42	2010-10-22	2010-10-22	2010-10-24	2010-10-20	3947
-1287730800	2010	10	22	22	42	2010-10-22	2010-10-22	2010-10-24	2010-10-20	3947
-1287730800	2010	10	22	22	42	2010-10-22	2010-10-22	2010-10-24	2010-10-20	3947
-1287730800	2010	10	22	22	42	2010-10-22	2010-10-22	2010-10-24	2010-10-20	3947
-1287817200	2010	10	23	23	42	2010-10-23	2010-10-23	2010-10-25	2010-10-21	3948
-1287817200	2010	10	23	23	42	2010-10-23	2010-10-23	2010-10-25	2010-10-21	3948
-1287817200	2010	10	23	23	42	2010-10-23	2010-10-23	2010-10-25	2010-10-21	3948
-1287817200	2010	10	23	23	42	2010-10-23	2010-10-23	2010-10-25	2010-10-21	3948
-1287817200	2010	10	23	23	42	2010-10-23	2010-10-23	2010-10-25	2010-10-21	3948
-1287817200	2010	10	23	23	42	2010-10-23	2010-10-23	2010-10-25	2010-10-21	3948
-1287817200	2010	10	23	23	42	2010-10-23	2010-10-23	2010-10-25	2010-10-21	3948
-1287817200	2010	10	23	23	42	2010-10-23	2010-10-23	2010-10-25	2010-10-21	3948
-1287817200	2010	10	23	23	42	2010-10-23	2010-10-23	2010-10-25	2010-10-21	3948
-1287817200	2010	10	23	23	42	2010-10-23	2010-10-23	2010-10-25	2010-10-21	3948
-1287817200	2010	10	23	23	42	2010-10-23	2010-10-23	2010-10-25	2010-10-21	3948
-1287817200	2010	10	23	23	42	2010-10-23	2010-10-23	2010-10-25	2010-10-21	3948
-1287903600	2010	10	24	24	42	2010-10-24	2010-10-24	2010-10-26	2010-10-22	3949
-1287903600	2010	10	24	24	42	2010-10-24	2010-10-24	2010-10-26	2010-10-22	3949
-1287903600	2010	10	24	24	42	2010-10-24	2010-10-24	2010-10-26	2010-10-22	3949
-1287903600	2010	10	24	24	42	2010-10-24	2010-10-24	2010-10-26	2010-10-22	3949
-1287903600	2010	10	24	24	42	2010-10-24	2010-10-24	2010-10-26	2010-10-22	3949
-1287903600	2010	10	24	24	42	2010-10-24	2010-10-24	2010-10-26	2010-10-22	3949
-1287903600	2010	10	24	24	42	2010-10-24	2010-10-24	2010-10-26	2010-10-22	3949
-1287903600	2010	10	24	24	42	2010-10-24	2010-10-24	2010-10-26	2010-10-22	3949
-1287903600	2010	10	24	24	42	2010-10-24	2010-10-24	2010-10-26	2010-10-22	3949
-1287903600	2010	10	24	24	42	2010-10-24	2010-10-24	2010-10-26	2010-10-22	3949
-1287903600	2010	10	24	24	42	2010-10-24	2010-10-24	2010-10-26	2010-10-22	3949
-1287903600	2010	10	24	24	42	2010-10-24	2010-10-24	2010-10-26	2010-10-22	3949
-1287990000	2010	10	25	25	43	2010-10-25	2010-10-25	2010-10-27	2010-10-23	3950
-1287990000	2010	10	25	25	43	2010-10-25	2010-10-25	2010-10-27	2010-10-23	3950
-1287990000	2010	10	25	25	43	2010-10-25	2010-10-25	2010-10-27	2010-10-23	3950
-1287990000	2010	10	25	25	43	2010-10-25	2010-10-25	2010-10-27	2010-10-23	3950
-1287990000	2010	10	25	25	43	2010-10-25	2010-10-25	2010-10-27	2010-10-23	3950
-1287990000	2010	10	25	25	43	2010-10-25	2010-10-25	2010-10-27	2010-10-23	3950
-1287990000	2010	10	25	25	43	2010-10-25	2010-10-25	2010-10-27	2010-10-23	3950
-1287990000	2010	10	25	25	43	2010-10-25	2010-10-25	2010-10-27	2010-10-23	3950
-1287990000	2010	10	25	25	43	2010-10-25	2010-10-25	2010-10-27	2010-10-23	3950
-1287990000	2010	10	25	25	43	2010-10-25	2010-10-25	2010-10-27	2010-10-23	3950
-1287990000	2010	10	25	25	43	2010-10-25	2010-10-25	2010-10-27	2010-10-23	3950
-1287990000	2010	10	25	25	43	2010-10-25	2010-10-25	2010-10-27	2010-10-23	3950
-1288076400	2010	10	26	26	43	2010-10-26	2010-10-26	2010-10-28	2010-10-24	3951
-1288076400	2010	10	26	26	43	2010-10-26	2010-10-26	2010-10-28	2010-10-24	3951
-1288076400	2010	10	26	26	43	2010-10-26	2010-10-26	2010-10-28	2010-10-24	3951
-1288076400	2010	10	26	26	43	2010-10-26	2010-10-26	2010-10-28	2010-10-24	3951
-1288076400	2010	10	26	26	43	2010-10-26	2010-10-26	2010-10-28	2010-10-24	3951
-1288076400	2010	10	26	26	43	2010-10-26	2010-10-26	2010-10-28	2010-10-24	3951
-1288076400	2010	10	26	26	43	2010-10-26	2010-10-26	2010-10-28	2010-10-24	3951
-1288076400	2010	10	26	26	43	2010-10-26	2010-10-26	2010-10-28	2010-10-24	3951
-1288076400	2010	10	26	26	43	2010-10-26	2010-10-26	2010-10-28	2010-10-24	3951
-1288076400	2010	10	26	26	43	2010-10-26	2010-10-26	2010-10-28	2010-10-24	3951
-1288076400	2010	10	26	26	43	2010-10-26	2010-10-26	2010-10-28	2010-10-24	3951
-1288076400	2010	10	26	26	43	2010-10-26	2010-10-26	2010-10-28	2010-10-24	3951
-1288076400	2010	10	26	26	43	2010-10-26	2010-10-26	2010-10-28	2010-10-24	3951
-1288162800	2010	10	27	27	43	2010-10-27	2010-10-27	2010-10-29	2010-10-25	3952
-1288162800	2010	10	27	27	43	2010-10-27	2010-10-27	2010-10-29	2010-10-25	3952
-1288162800	2010	10	27	27	43	2010-10-27	2010-10-27	2010-10-29	2010-10-25	3952
-1288162800	2010	10	27	27	43	2010-10-27	2010-10-27	2010-10-29	2010-10-25	3952
-1288162800	2010	10	27	27	43	2010-10-27	2010-10-27	2010-10-29	2010-10-25	3952
-1288162800	2010	10	27	27	43	2010-10-27	2010-10-27	2010-10-29	2010-10-25	3952
-1288162800	2010	10	27	27	43	2010-10-27	2010-10-27	2010-10-29	2010-10-25	3952
-1288162800	2010	10	27	27	43	2010-10-27	2010-10-27	2010-10-29	2010-10-25	3952
-1288162800	2010	10	27	27	43	2010-10-27	2010-10-27	2010-10-29	2010-10-25	3952
-1288162800	2010	10	27	27	43	2010-10-27	2010-10-27	2010-10-29	2010-10-25	3952
-1288162800	2010	10	27	27	43	2010-10-27	2010-10-27	2010-10-29	2010-10-25	3952
-1288249200	2010	10	28	28	43	2010-10-28	2010-10-28	2010-10-30	2010-10-26	3953
-1288249200	2010	10	28	28	43	2010-10-28	2010-10-28	2010-10-30	2010-10-26	3953
-1288249200	2010	10	28	28	43	2010-10-28	2010-10-28	2010-10-30	2010-10-26	3953
-1288249200	2010	10	28	28	43	2010-10-28	2010-10-28	2010-10-30	2010-10-26	3953
-1288249200	2010	10	28	28	43	2010-10-28	2010-10-28	2010-10-30	2010-10-26	3953
-1288249200	2010	10	28	28	43	2010-10-28	2010-10-28	2010-10-30	2010-10-26	3953
-1288249200	2010	10	28	28	43	2010-10-28	2010-10-28	2010-10-30	2010-10-26	3953
-1288249200	2010	10	28	28	43	2010-10-28	2010-10-28	2010-10-30	2010-10-26	3953
-1288249200	2010	10	28	28	43	2010-10-28	2010-10-28	2010-10-30	2010-10-26	3953
-1288249200	2010	10	28	28	43	2010-10-28	2010-10-28	2010-10-30	2010-10-26	3953
-1288249200	2010	10	28	28	43	2010-10-28	2010-10-28	2010-10-30	2010-10-26	3953
-1288249200	2010	10	28	28	43	2010-10-28	2010-10-28	2010-10-30	2010-10-26	3953
-1288335600	2010	10	29	29	43	2010-10-29	2010-10-29	2010-10-31	2010-10-27	3954
-1288335600	2010	10	29	29	43	2010-10-29	2010-10-29	2010-10-31	2010-10-27	3954
-1288335600	2010	10	29	29	43	2010-10-29	2010-10-29	2010-10-31	2010-10-27	3954
-1288335600	2010	10	29	29	43	2010-10-29	2010-10-29	2010-10-31	2010-10-27	3954
-1288335600	2010	10	29	29	43	2010-10-29	2010-10-29	2010-10-31	2010-10-27	3954
-1288335600	2010	10	29	29	43	2010-10-29	2010-10-29	2010-10-31	2010-10-27	3954
-1288335600	2010	10	29	29	43	2010-10-29	2010-10-29	2010-10-31	2010-10-27	3954
-1288335600	2010	10	29	29	43	2010-10-29	2010-10-29	2010-10-31	2010-10-27	3954
-1288335600	2010	10	29	29	43	2010-10-29	2010-10-29	2010-10-31	2010-10-27	3954
-1288335600	2010	10	29	29	43	2010-10-29	2010-10-29	2010-10-31	2010-10-27	3954
-1288335600	2010	10	29	29	43	2010-10-29	2010-10-29	2010-10-31	2010-10-27	3954
-1288335600	2010	10	29	29	43	2010-10-29	2010-10-29	2010-10-31	2010-10-27	3954
-1288422000	2010	10	30	30	43	2010-10-30	2010-10-30	2010-11-01	2010-10-28	3955
-1288422000	2010	10	30	30	43	2010-10-30	2010-10-30	2010-11-01	2010-10-28	3955
-1288422000	2010	10	30	30	43	2010-10-30	2010-10-30	2010-11-01	2010-10-28	3955
-1288422000	2010	10	30	30	43	2010-10-30	2010-10-30	2010-11-01	2010-10-28	3955
-1288422000	2010	10	30	30	43	2010-10-30	2010-10-30	2010-11-01	2010-10-28	3955
-1288422000	2010	10	30	30	43	2010-10-30	2010-10-30	2010-11-01	2010-10-28	3955
-1288422000	2010	10	30	30	43	2010-10-30	2010-10-30	2010-11-01	2010-10-28	3955
-1288422000	2010	10	30	30	43	2010-10-30	2010-10-30	2010-11-01	2010-10-28	3955
-1288422000	2010	10	30	30	43	2010-10-30	2010-10-30	2010-11-01	2010-10-28	3955
-1288422000	2010	10	30	30	43	2010-10-30	2010-10-30	2010-11-01	2010-10-28	3955
-1288422000	2010	10	30	30	43	2010-10-30	2010-10-30	2010-11-01	2010-10-28	3955
-1288508400	2010	10	31	31	43	2010-10-31	2010-10-31	2010-11-02	2010-10-29	3956
-1288508400	2010	10	31	31	43	2010-10-31	2010-10-31	2010-11-02	2010-10-29	3956
-1288508400	2010	10	31	31	43	2010-10-31	2010-10-31	2010-11-02	2010-10-29	3956
-1288508400	2010	10	31	31	43	2010-10-31	2010-10-31	2010-11-02	2010-10-29	3956
-1288508400	2010	10	31	31	43	2010-10-31	2010-10-31	2010-11-02	2010-10-29	3956
-1288508400	2010	10	31	31	43	2010-10-31	2010-10-31	2010-11-02	2010-10-29	3956
-1288508400	2010	10	31	31	43	2010-10-31	2010-10-31	2010-11-02	2010-10-29	3956
-1288508400	2010	10	31	31	43	2010-10-31	2010-10-31	2010-11-02	2010-10-29	3956
+1287558000	2010	10	20	20	4	42	2010-10-20	2010-10-20	2010-10-22	2010-10-18	3945
+1287558000	2010	10	20	20	4	42	2010-10-20	2010-10-20	2010-10-22	2010-10-18	3945
+1287558000	2010	10	20	20	4	42	2010-10-20	2010-10-20	2010-10-22	2010-10-18	3945
+1287558000	2010	10	20	20	4	42	2010-10-20	2010-10-20	2010-10-22	2010-10-18	3945
+1287558000	2010	10	20	20	4	42	2010-10-20	2010-10-20	2010-10-22	2010-10-18	3945
+1287558000	2010	10	20	20	4	42	2010-10-20	2010-10-20	2010-10-22	2010-10-18	3945
+1287558000	2010	10	20	20	4	42	2010-10-20	2010-10-20	2010-10-22	2010-10-18	3945
+1287558000	2010	10	20	20	4	42	2010-10-20	2010-10-20	2010-10-22	2010-10-18	3945
+1287558000	2010	10	20	20	4	42	2010-10-20	2010-10-20	2010-10-22	2010-10-18	3945
+1287558000	2010	10	20	20	4	42	2010-10-20	2010-10-20	2010-10-22	2010-10-18	3945
+1287558000	2010	10	20	20	4	42	2010-10-20	2010-10-20	2010-10-22	2010-10-18	3945
+1287644400	2010	10	21	21	5	42	2010-10-21	2010-10-21	2010-10-23	2010-10-19	3946
+1287644400	2010	10	21	21	5	42	2010-10-21	2010-10-21	2010-10-23	2010-10-19	3946
+1287644400	2010	10	21	21	5	42	2010-10-21	2010-10-21	2010-10-23	2010-10-19	3946
+1287644400	2010	10	21	21	5	42	2010-10-21	2010-10-21	2010-10-23	2010-10-19	3946
+1287644400	2010	10	21	21	5	42	2010-10-21	2010-10-21	2010-10-23	2010-10-19	3946
+1287644400	2010	10	21	21	5	42	2010-10-21	2010-10-21	2010-10-23	2010-10-19	3946
+1287644400	2010	10	21	21	5	42	2010-10-21	2010-10-21	2010-10-23	2010-10-19	3946
+1287644400	2010	10	21	21	5	42	2010-10-21	2010-10-21	2010-10-23	2010-10-19	3946
+1287644400	2010	10	21	21	5	42	2010-10-21	2010-10-21	2010-10-23	2010-10-19	3946
+1287644400	2010	10	21	21	5	42	2010-10-21	2010-10-21	2010-10-23	2010-10-19	3946
+1287644400	2010	10	21	21	5	42	2010-10-21	2010-10-21	2010-10-23	2010-10-19	3946
+1287644400	2010	10	21	21	5	42	2010-10-21	2010-10-21	2010-10-23	2010-10-19	3946
+1287730800	2010	10	22	22	6	42	2010-10-22	2010-10-22	2010-10-24	2010-10-20	3947
+1287730800	2010	10	22	22	6	42	2010-10-22	2010-10-22	2010-10-24	2010-10-20	3947
+1287730800	2010	10	22	22	6	42	2010-10-22	2010-10-22	2010-10-24	2010-10-20	3947
+1287730800	2010	10	22	22	6	42	2010-10-22	2010-10-22	2010-10-24	2010-10-20	3947
+1287730800	2010	10	22	22	6	42	2010-10-22	2010-10-22	2010-10-24	2010-10-20	3947
+1287730800	2010	10	22	22	6	42	2010-10-22	2010-10-22	2010-10-24	2010-10-20	3947
+1287730800	2010	10	22	22	6	42	2010-10-22	2010-10-22	2010-10-24	2010-10-20	3947
+1287730800	2010	10	22	22	6	42	2010-10-22	2010-10-22	2010-10-24	2010-10-20	3947
+1287730800	2010	10	22	22	6	42	2010-10-22	2010-10-22	2010-10-24	2010-10-20	3947
+1287730800	2010	10	22	22	6	42	2010-10-22	2010-10-22	2010-10-24	2010-10-20	3947
+1287730800	2010	10	22	22	6	42	2010-10-22	2010-10-22	2010-10-24	2010-10-20	3947
+1287817200	2010	10	23	23	7	42	2010-10-23	2010-10-23	2010-10-25	2010-10-21	3948
+1287817200	2010	10	23	23	7	42	2010-10-23	2010-10-23	2010-10-25	2010-10-21	3948
+1287817200	2010	10	23	23	7	42	2010-10-23	2010-10-23	2010-10-25	2010-10-21	3948
+1287817200	2010	10	23	23	7	42	2010-10-23	2010-10-23	2010-10-25	2010-10-21	3948
+1287817200	2010	10	23	23	7	42	2010-10-23	2010-10-23	2010-10-25	2010-10-21	3948
+1287817200	2010	10	23	23	7	42	2010-10-23	2010-10-23	2010-10-25	2010-10-21	3948
+1287817200	2010	10	23	23	7	42	2010-10-23	2010-10-23	2010-10-25	2010-10-21	3948
+1287817200	2010	10	23	23	7	42	2010-10-23	2010-10-23	2010-10-25	2010-10-21	3948
+1287817200	2010	10	23	23	7	42	2010-10-23	2010-10-23	2010-10-25	2010-10-21	3948
+1287817200	2010	10	23	23	7	42	2010-10-23	2010-10-23	2010-10-25	2010-10-21	3948
+1287817200	2010	10	23	23	7	42	2010-10-23	2010-10-23	2010-10-25	2010-10-21	3948
+1287817200	2010	10	23	23	7	42	2010-10-23	2010-10-23	2010-10-25	2010-10-21	3948
+1287903600	2010	10	24	24	1	42	2010-10-24	2010-10-24	2010-10-26	2010-10-22	3949
+1287903600	2010	10	24	24	1	42	2010-10-24	2010-10-24	2010-10-26	2010-10-22	3949
+1287903600	2010	10	24	24	1	42	2010-10-24	2010-10-24	2010-10-26	2010-10-22	3949
+1287903600	2010	10	24	24	1	42	2010-10-24	2010-10-24	2010-10-26	2010-10-22	3949
+1287903600	2010	10	24	24	1	42	2010-10-24	2010-10-24	2010-10-26	2010-10-22	3949
+1287903600	2010	10	24	24	1	42	2010-10-24	2010-10-24	2010-10-26	2010-10-22	3949
+1287903600	2010	10	24	24	1	42	2010-10-24	2010-10-24	2010-10-26	2010-10-22	3949
+1287903600	2010	10	24	24	1	42	2010-10-24	2010-10-24	2010-10-26	2010-10-22	3949
+1287903600	2010	10	24	24	1	42	2010-10-24	2010-10-24	2010-10-26	2010-10-22	3949
+1287903600	2010	10	24	24	1	42	2010-10-24	2010-10-24	2010-10-26	2010-10-22	3949
+1287903600	2010	10	24	24	1	42	2010-10-24	2010-10-24	2010-10-26	2010-10-22	3949
+1287903600	2010	10	24	24	1	42	2010-10-24	2010-10-24	2010-10-26	2010-10-22	3949
+1287990000	2010	10	25	25	2	43	2010-10-25	2010-10-25	2010-10-27	2010-10-23	3950
+1287990000	2010	10	25	25	2	43	2010-10-25	2010-10-25	2010-10-27	2010-10-23	3950
+1287990000	2010	10	25	25	2	43	2010-10-25	2010-10-25	2010-10-27	2010-10-23	3950
+1287990000	2010	10	25	25	2	43	2010-10-25	2010-10-25	2010-10-27	2010-10-23	3950
+1287990000	2010	10	25	25	2	43	2010-10-25	2010-10-25	2010-10-27	2010-10-23	3950
+1287990000	2010	10	25	25	2	43	2010-10-25	2010-10-25	2010-10-27	2010-10-23	3950
+1287990000	2010	10	25	25	2	43	2010-10-25	2010-10-25	2010-10-27	2010-10-23	3950
+1287990000	2010	10	25	25	2	43	2010-10-25	2010-10-25	2010-10-27	2010-10-23	3950
+1287990000	2010	10	25	25	2	43	2010-10-25	2010-10-25	2010-10-27	2010-10-23	3950
+1287990000	2010	10	25	25	2	43	2010-10-25	2010-10-25	2010-10-27	2010-10-23	3950
+1287990000	2010	10	25	25	2	43	2010-10-25	2010-10-25	2010-10-27	2010-10-23	3950
+1287990000	2010	10	25	25	2	43	2010-10-25	2010-10-25	2010-10-27	2010-10-23	3950
+1288076400	2010	10	26	26	3	43	2010-10-26	2010-10-26	2010-10-28	2010-10-24	3951
+1288076400	2010	10	26	26	3	43	2010-10-26	2010-10-26	2010-10-28	2010-10-24	3951
+1288076400	2010	10	26	26	3	43	2010-10-26	2010-10-26	2010-10-28	2010-10-24	3951
+1288076400	2010	10	26	26	3	43	2010-10-26	2010-10-26	2010-10-28	2010-10-24	3951
+1288076400	2010	10	26	26	3	43	2010-10-26	2010-10-26	2010-10-28	2010-10-24	3951
+1288076400	2010	10	26	26	3	43	2010-10-26	2010-10-26	2010-10-28	2010-10-24	3951
+1288076400	2010	10	26	26	3	43	2010-10-26	2010-10-26	2010-10-28	2010-10-24	3951
+1288076400	2010	10	26	26	3	43	2010-10-26	2010-10-26	2010-10-28	2010-10-24	3951
+1288076400	2010	10	26	26	3	43	2010-10-26	2010-10-26	2010-10-28	2010-10-24	3951
+1288076400	2010	10	26	26	3	43	2010-10-26	2010-10-26	2010-10-28	2010-10-24	3951
+1288076400	2010	10	26	26	3	43	2010-10-26	2010-10-26	2010-10-28	2010-10-24	3951
+1288076400	2010	10	26	26	3	43	2010-10-26	2010-10-26	2010-10-28	2010-10-24	3951
+1288076400	2010	10	26	26	3	43	2010-10-26	2010-10-26	2010-10-28	2010-10-24	3951
+1288162800	2010	10	27	27	4	43	2010-10-27	2010-10-27	2010-10-29	2010-10-25	3952
+1288162800	2010	10	27	27	4	43	2010-10-27	2010-10-27	2010-10-29	2010-10-25	3952
+1288162800	2010	10	27	27	4	43	2010-10-27	2010-10-27	2010-10-29	2010-10-25	3952
+1288162800	2010	10	27	27	4	43	2010-10-27	2010-10-27	2010-10-29	2010-10-25	3952
+1288162800	2010	10	27	27	4	43	2010-10-27	2010-10-27	2010-10-29	2010-10-25	3952
+1288162800	2010	10	27	27	4	43	2010-10-27	2010-10-27	2010-10-29	2010-10-25	3952
+1288162800	2010	10	27	27	4	43	2010-10-27	2010-10-27	2010-10-29	2010-10-25	3952
+1288162800	2010	10	27	27	4	43	2010-10-27	2010-10-27	2010-10-29	2010-10-25	3952
+1288162800	2010	10	27	27	4	43	2010-10-27	2010-10-27	2010-10-29	2010-10-25	3952
+1288162800	2010	10	27	27	4	43	2010-10-27	2010-10-27	2010-10-29	2010-10-25	3952
+1288162800	2010	10	27	27	4	43	2010-10-27	2010-10-27	2010-10-29	2010-10-25	3952
+1288249200	2010	10	28	28	5	43	2010-10-28	2010-10-28	2010-10-30	2010-10-26	3953
+1288249200	2010	10	28	28	5	43	2010-10-28	2010-10-28	2010-10-30	2010-10-26	3953
+1288249200	2010	10	28	28	5	43	2010-10-28	2010-10-28	2010-10-30	2010-10-26	3953
+1288249200	2010	10	28	28	5	43	2010-10-28	2010-10-28	2010-10-30	2010-10-26	3953
+1288249200	2010	10	28	28	5	43	2010-10-28	2010-10-28	2010-10-30	2010-10-26	3953
+1288249200	2010	10	28	28	5	43	2010-10-28	2010-10-28	2010-10-30	2010-10-26	3953
+1288249200	2010	10	28	28	5	43	2010-10-28	2010-10-28	2010-10-30	2010-10-26	3953
+1288249200	2010	10	28	28	5	43	2010-10-28	2010-10-28	2010-10-30	2010-10-26	3953
+1288249200	2010	10	28	28	5	43	2010-10-28	2010-10-28	2010-10-30	2010-10-26	3953
+1288249200	2010	10	28	28	5	43	2010-10-28	2010-10-28	2010-10-30	2010-10-26	3953
+1288249200	2010	10	28	28	5	43	2010-10-28	2010-10-28	2010-10-30	2010-10-26	3953
+1288249200	2010	10	28	28	5	43	2010-10-28	2010-10-28	2010-10-30	2010-10-26	3953
+1288335600	2010	10	29	29	6	43	2010-10-29	2010-10-29	2010-10-31	2010-10-27	3954
+1288335600	2010	10	29	29	6	43	2010-10-29	2010-10-29	2010-10-31	2010-10-27	3954
+1288335600	2010	10	29	29	6	43	2010-10-29	2010-10-29	2010-10-31	2010-10-27	3954
+1288335600	2010	10	29	29	6	43	2010-10-29	2010-10-29	2010-10-31	2010-10-27	3954
+1288335600	2010	10	29	29	6	43	2010-10-29	2010-10-29	2010-10-31	2010-10-27	3954
+1288335600	2010	10	29	29	6	43	2010-10-29	2010-10-29	2010-10-31	2010-10-27	3954
+1288335600	2010	10	29	29	6	43	2010-10-29	2010-10-29	2010-10-31	2010-10-27	3954
+1288335600	2010	10	29	29	6	43	2010-10-29	2010-10-29	2010-10-31	2010-10-27	3954
+1288335600	2010	10	29	29	6	43	2010-10-29	2010-10-29	2010-10-31	2010-10-27	3954
+1288335600	2010	10	29	29	6	43	2010-10-29	2010-10-29	2010-10-31	2010-10-27	3954
+1288335600	2010	10	29	29	6	43	2010-10-29	2010-10-29	2010-10-31	2010-10-27	3954
+1288335600	2010	10	29	29	6	43	2010-10-29	2010-10-29	2010-10-31	2010-10-27	3954
+1288422000	2010	10	30	30	7	43	2010-10-30	2010-10-30	2010-11-01	2010-10-28	3955
+1288422000	2010	10	30	30	7	43	2010-10-30	2010-10-30	2010-11-01	2010-10-28	3955
+1288422000	2010	10	30	30	7	43	2010-10-30	2010-10-30	2010-11-01	2010-10-28	3955
+1288422000	2010	10	30	30	7	43	2010-10-30	2010-10-30	2010-11-01	2010-10-28	3955
+1288422000	2010	10	30	30	7	43	2010-10-30	2010-10-30	2010-11-01	2010-10-28	3955
+1288422000	2010	10	30	30	7	43	2010-10-30	2010-10-30	2010-11-01	2010-10-28	3955
+1288422000	2010	10	30	30	7	43	2010-10-30	2010-10-30	2010-11-01	2010-10-28	3955
+1288422000	2010	10	30	30	7	43	2010-10-30	2010-10-30	2010-11-01	2010-10-28	3955
+1288422000	2010	10	30	30	7	43	2010-10-30	2010-10-30	2010-11-01	2010-10-28	3955
+1288422000	2010	10	30	30	7	43	2010-10-30	2010-10-30	2010-11-01	2010-10-28	3955
+1288422000	2010	10	30	30	7	43	2010-10-30	2010-10-30	2010-11-01	2010-10-28	3955
+1288508400	2010	10	31	31	1	43	2010-10-31	2010-10-31	2010-11-02	2010-10-29	3956
+1288508400	2010	10	31	31	1	43	2010-10-31	2010-10-31	2010-11-02	2010-10-29	3956
+1288508400	2010	10	31	31	1	43	2010-10-31	2010-10-31	2010-11-02	2010-10-29	3956
+1288508400	2010	10	31	31	1	43	2010-10-31	2010-10-31	2010-11-02	2010-10-29	3956
+1288508400	2010	10	31	31	1	43	2010-10-31	2010-10-31	2010-11-02	2010-10-29	3956
+1288508400	2010	10	31	31	1	43	2010-10-31	2010-10-31	2010-11-02	2010-10-29	3956
+1288508400	2010	10	31	31	1	43	2010-10-31	2010-10-31	2010-11-02	2010-10-29	3956
+1288508400	2010	10	31	31	1	43	2010-10-31	2010-10-31	2010-11-02	2010-10-29	3956
 PREHOOK: query: EXPLAIN SELECT
   year(fl_time) = year(fl_date),
   month(fl_time) = month(fl_date),
   day(fl_time) = day(fl_date),
   dayofmonth(fl_time) = dayofmonth(fl_date),
+  dayofweek(fl_time) = dayofweek(fl_date),
   weekofyear(fl_time) = weekofyear(fl_date),
   date(fl_time) = date(fl_date),
   to_date(fl_time) = to_date(fl_date),
@@ -645,6 +654,7 @@ POSTHOOK: query: EXPLAIN SELECT
   month(fl_time) = month(fl_date),
   day(fl_time) = day(fl_date),
   dayofmonth(fl_time) = dayofmonth(fl_date),
+  dayofweek(fl_time) = dayofweek(fl_date),
   weekofyear(fl_time) = weekofyear(fl_date),
   date(fl_time) = date(fl_date),
   to_date(fl_time) = to_date(fl_date),
@@ -664,8 +674,8 @@ STAGE PLANS:
         TableScan
           alias: date_udf_flight_orc
           Select Operator
-            expressions: (year(fl_time) = year(fl_date)) (type: boolean), (month(fl_time) = month(fl_date)) (type: boolean), (day(fl_time) = day(fl_date)) (type: boolean), (dayofmonth(fl_time) = dayofmonth(fl_date)) (type: boolean), (weekofyear(fl_time) = weekofyear(fl_date)) (type: boolean), (CAST( fl_time AS DATE) = fl_date) (type: boolean), (to_date(fl_time) = to_date(fl_date)) (type: boolean), (date_add(fl_time, 2) = date_add(fl_date, 2)) (type: boolean), (date_sub(fl_time, 2) = date_sub(fl_date, 2)) (type: boolean), (datediff(fl_time, '2000-01-01') = datediff(fl_date, '2000-01-01')) (type: boolean)
-            outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col9
+            expressions: (year(fl_time) = year(fl_date)) (type: boolean), (month(fl_time) = month(fl_date)) (type: boolean), (day(fl_time) = day(fl_date)) (type: boolean), (dayofmonth(fl_time) = dayofmonth(fl_date)) (type: boolean), (dayofweek(fl_time) = dayofweek(fl_date)) (type: boolean), (weekofyear(fl_time) = weekofyear(fl_date)) (type: boolean), (CAST( fl_time AS DATE) = fl_date) (type: boolean), (to_date(fl_time) = to_date(fl_date)) (type: boolean), (date_add(fl_time, 2) = date_add(fl_date, 2)) (type: boolean), (date_sub(fl_time, 2) = date_sub(fl_date, 2)) (type: boolean), (datediff(fl_time, '2000-01-01') = datediff(fl_date, '2000-01-01')) (type: boolean)
+            outputColumnNames: _col0, _col1, _col2, _col3, _col4, _col5, _col6, _col7, _col8, _col9, _col10
             ListSink
 
 PREHOOK: query: -- Should all be true or NULL
@@ -674,6 +684,7 @@ SELECT
   month(fl_time) = month(fl_date),
   day(fl_time) = day(fl_date),
   dayofmonth(fl_time) = dayofmonth(fl_date),
+  dayofweek(fl_time) = dayofweek(fl_date),
   weekofyear(fl_time) = weekofyear(fl_date),
   date(fl_time) = date(fl_date),
   to_date(fl_time) = to_date(fl_date),
@@ -690,6 +701,7 @@ SELECT
   month(fl_time) = month(fl_date),
   day(fl_time) = day(fl_date),
   dayofmonth(fl_time) = dayofmonth(fl_date),
+  dayofweek(fl_time) = dayofweek(fl_date),
   weekofyear(fl_time) = weekofyear(fl_date),
   date(fl_time) = date(fl_date),
   to_date(fl_time) = to_date(fl_date),
@@ -700,143 +712,143 @@ FROM date_udf_flight_orc
 POSTHOOK: type: QUERY
 POSTHOOK: Input: default@date_udf_flight_orc
 #### A masked pattern was here ####
-true	true	true	true	true	true	true	true	true	true
-true	true	true	true	true	true	true	true	true	true
-true	true	true	true	true	true	true	true	true	true
-true	true	true	true	true	true	true	true	true	true
-true	true	true	true	true	true	true	true	true	true
-true	true	true	true	true	true	true	true	true	true
-true	true	true	true	true	true	true	true	true	true
-true	true	true	true	true	true	true	true	true	true
-true	true	true	true	true	true	true	true	true	true
-true	true	true	true	true	true	true	true	true	true
-true	true	true	true	true	true	true	true	true	true
-true	true	true	true	true	true	true	true	true	true
-true	true	true	true	true	true	true	true	true	true
-true	true	true	true	true	true	true	true	true	true
-true	true	true	true	true	true	true	true	true	true
-true	true	true	true	true	true	true	true	true	true
-true	true	true	true	true	true	true	true	true	true
-true	true	true	true	true	true	true	true	true	true
-true	true	true	true	true	true	true	true	true	true
-true	true	true	true	true	true	true	true	true	true
-true	true	true	true	true	true	true	true	true	true
-true	true	true	true	true	true	true	true	true	true
-true	true	true	true	true	true	true	true	true	true
-true	true	true	true	true	true	true	true	true	true
-true	true	true	true	true	true	true	true	true	true
-true	true	true	true	true	true	true	true	true	true
-true	true	true	true	true	true	true	true	true	true
-true	true	true	true	true	true	true	true	true	true
-true	true	true	true	true	true	true	true	true	true
-true	true	true	true	true	true	true	true	true	true
-true	true	true	true	true	true	true	true	true	true
-true	true	true	true	true	true	true	true	true	true
-true	true	true	true	true	true	true	true	true	true
-true	true	true	true	true	true	true	true	true	true
-true	true	true	true	true	true	true	true	true	true
-true	true	true	true	true	true	true	true	true	true
-true	true	true	true	true	true	true	true	true	true
-true	true	true	true	true	true	true	true	true	true
-true	true	true	true	true	true	true	true	true	true
-true	true	true	true	true	true	true	true	true	true
-true	true	true	true	true	true	true	true	true	true
-true	true	true	true	true	true	true	true	true	true
-true	true	true	true	true	true	true	true	true	true
-true	true	true	true	true	true	true	true	true	true
-true	true	true	true	true	true	true	true	true	true
-true	true	true	true	true	true	true	true	true	true
-true	true	true	true	true	true	true	true	true	true
-true	true	true	true	true	true	true	true	true	true
-true	true	true	true	true	true	true	true	true	true
-true	true	true	true	true	true	true	true	true	true
-true	true	true	true	true	true	true	true	true	true
-true	true	true	true	true	true	true	true	true	true
-true	true	true	true	true	true	true	true	true	true
-true	true	true	true	true	true	true	true	true	true
-true	true	true	true	true	true	true	true	true	true
-true	true	true	true	true	true	true	true	true	true
-true	true	true	true	true	true	true	true	true	true
-true	true	true	true	true	true	true	true	true	true
-true	true	true	true	true	true	true	true	true	true
-true	true	true	true	true	true	true	true	true	true
-true	true	true	true	true	true	true	true	true	true
-true	true	true	true	true	true	true	true	true	true
-true	true	true	true	true	true	true	true	true	true
-true	true	true	true	true	true	true	true	true	true
-true	true	true	true	true	true	true	true	true	true
-true	true	true	true	true	true	true	true	true	true
-true	true	true	true	true	true	true	true	true	true
-true	true	true	true	true	true	true	true	true	true
-true	true	true	true	true	true	true	true	true	true
-true	true	true	true	true	true	true	true	true	true
-true	true	true	true	true	true	true	true	true	true
-true	true	true	true	true	true	true	true	true	true
-true	true	true	true	true	true	true	true	true	true
-true	true	true	true	true	true	true	true	true	true
-true	true	true	true	true	true	true	true	true	true
-true	true	true	true	true	true	true	true	true	true
-true	true	true	true	true	true	true	true	true	true
-true	true	true	true	true	true	true	true	true	true
-true	true	true	true	true	true	true	true	true	true
-true	true	true	true	true	true	true	true	true	true
-true	true	true	true	true	true	true	true	true	true
-true	true	true	true	true	true	true	true	true	true
-true	true	true	true	true	true	true	true	true	true
-true	true	true	true	true	true	true	true	true	true
-true	true	true	true	true	true	true	true	true	true
-true	true	true	true	true	true	true	true	true	true
-true	true	true	true	true	true	true	true	true	true
-true	true	true	true	true	true	true	true	true	true
-true	true	true	true	true	true	true	true	true	true
-true	true	true	true	true	true	true	true	true	true
-true	true	true	true	true	true	true	true	true	true
-true	true	true	true	true	true	true	true	true	true
-true	true	true	true	true	true	true	true	true	true
-true	true	true	true	true	true	true	true	true	true
-true	true	true	true	true	true	true	true	true	true
-true	true	true	true	true	true	true	true	true	true
-true	true	true	true	true	true	true	true	true	true
-true	true	true	true	true	true	true	true	true	true
-true	true	true	true	true	true	true	true	true	true
-true	true	true	true	true	true	true	true	true	true
-true	true	true	true	true	true	true	true	true	true
-true	true	true	true	true	true	true	true	true	true
-true	true	true	true	true	true	true	true	true	true
-true	true	true	true	true	true	true	true	true	true
-true	true	true	true	true	true	true	true	true	true
-true	true	true	true	true	true	true	true	true	true
-true	true	true	true	true	true	true	true	true	true
-true	true	true	true	true	true	true	true	true	true
-true	true	true	true	true	true	true	true	true	true
-true	true	true	true	true	true	true	true	true	true
-true	true	true	true	true	true	true	true	true	true
-true	true	true	true	true	true	true	true	true	true
-true	true	true	true	true	true	true	true	true	true
-true	true	true	true	true	true	true	true	true	true
-true	true	true	true	true	true	true	true	true	true
-true	true	true	true	true	true	true	true	true	true
-true	true	true	true	true	true	true	true	true	true
-true	true	true	true	true	true	true	true	true	true
-true	true	true	true	true	true	true	true	true	true
-true	true	true	true	true	true	true	true	true	true
-true	true	true	true	true	true	true	true	true	true
-true	true	true	true	true	true	true	true	true	true
-true	true	true	true	true	true	true	true	true	true
-true	true	true	true	true	true	true	true	true	true
-true	true	true	true	true	true	true	true	true	true
-true	true	true	true	true	true	true	true	true	true
-true	true	true	true	true	true	true	true	true	true
-true	true	true	true	true	true	true	true	true	true
-true	true	true	true	true	true	true	true	true	true
-true	true	true	true	true	true	true	true	true	true
-true	true	true	true	true	true	true	true	true	true
-true	true	true	true	true	true	true	true	true	true
-true	true	true	true	true	true	true	true	true	true
-true	true	true	true	true	true	true	true	true	true
-true	true	true	true	true	true	true	true	true	true
-true	true	true	true	true	true	true	true	true	true
-true	true	true	true	true	true	true	true	true	true
+true	true	true	true	true	true	true	true	true	true	true
+true	true	true	true	true	true	true	true	true	true	true
+true	true	true	true	true	true	true	true	true	true	true
+true	true	true	true	true	true	true	true	true	true	true
+true	true	true	true	true	true	true	true	true	true	true
+true	true	true	true	true	true	true	true	true	true	true
+true	true	true	true	true	true	true	true	true	true	true
+true	true	true	true	true	true	true	true	true	true	true
+true	true	true	true	true	true	true	true	true	true	true
+true	true	true	true	true	true	true	true	true	true	true
+true	true	true	true	true	true	true	true	true	true	true
+true	true	true	true	true	true	true	true	true	true	true
+true	true	true	true	true	true	true	true	true	true	true
+true	true	true	true	true	true	true	true	true	true	true
+true	true	true	true	true	true	true	true	true	true	true
+true	true	true	true	true	true	true	true	true	true	true
+true	true	true	true	true	true	true	true	true	true	true
+true	true	true	true	true	true	true	true	true	true	true
+true	true	true	true	true	true	true	true	true	true	true
+true	true	true	true	true	true	true	true	true	true	true
+true	true	true	true	true	true	true	true	true	true	true
+true	true	true	true	true	true	true	true	true	true	true
+true	true	true	true	true	true	true	true	true	true	true
+true	true	true	true	true	true	true	true	true	true	true
+true	true	true	true	true	true	true	true	true	true	true
+true	true	true	true	true	true	true	true	true	true	true
+true	true	true	true	true	true	true	true	true	true	true
+true	true	true	true	true	true	true	true	true	true	true
+true	true	true	true	true	true	true	true	true	true	true
+true	true	true	true	true	true	true	true	true	true	true
+true	true	true	true	true	true	true	true	true	true	true
+true	true	true	true	true	true	true	true	true	true	true
+true	true	true	true	true	true	true	true	true	true	true
+true	true	true	true	true	true	true	true	true	true	true
+true	true	true	true	true	true	true	true	true	true	true
+true	true	true	true	true	true	true	true	true	true	true
+true	true	true	true	true	true	true	true	true	true	true
+true	true	true	true	true	true	true	true	true	true	true
+true	true	true	true	true	true	true	true	true	true	true
+true	true	true	true	true	true	true	true	true	true	true
+true	true	true	true	true	true	true	true	true	true	true
+true	true	true	true	true	true	true	true	true	true	true
+true	true	true	true	true	true	true	true	true	true	true
+true	true	true	true	true	true	true	true	true	true	true
+true	true	true	true	true	true	true	true	true	true	true
+true	true	true	true	true	true	true	true	true	true	true
+true	true	true	true	true	true	true	true	true	true	true
+true	true	true	true	true	true	true	true	true	true	true
+true	true	true	true	true	true	true	true	true	true	true
+true	true	true	true	true	true	true	true	true	true	true
+true	true	true	true	true	true	true	true	true	true	true
+true	true	true	true	true	true	true	true	true	true	true
+true	true	true	true	true	true	true	true	true	true	true
+true	true	true	true	true	true	true	true	true	true	true
+true	true	true	true	true	true	true	true	true	true	true
+true	true	true	true	true	true	true	true	true	true	true
+true	true	true	true	true	true	true	true	true	true	true
+true	true	true	true	true	true	true	true	true	true	true
+true	true	true	true	true	true	true	true	true	true	true
+true	true	true	true	true	true	true	true	true	true	true
+true	true	true	true	true	true	true	true	true	true	true
+true	true	true	true	true	true	true	true	true	true	true
+true	true	true	true	true	true	true	true	true	true	true
+true	true	true	true	true	true	true	true	true	true	true
+true	true	true	true	true	true	true	true	true	true	true
+true	true	true	true	true	true	true	true	true	true	true
+true	true	true	true	true	true	true	true	true	true	true
+true	true	true	true	true	true	true	true	true	true	true
+true	true	true	true	true	true	true	true	true	true	true
+true	true	true	true	true	true	true	true	true	true	true
+true	true	true	true	true	true	true	true	true	true	true
+true	true	true	true	true	true	true	true	true	true	true
+true	true	true	true	true	true	true	true	true	true	true
+true	true	true	true	true	true	true	true	true	true	true
+true	true	true	true	true	true	true	true	true	true	true
+true	true	true	true	true	true	true	true	true	true	true
+true	true	true	true	true	true	true	true	true	true	true
+true	true	true	true	true	true	true	true	true	true	true
+true	true	true	true	true	true	true	true	true	true	true
+true	true	true	true	true	true	true	true	true	true	true
+true	true	true	true	true	true	true	true	true	true	true
+true	true	true	true	true	true	true	true	true	true	true
+true	true	true	true	true	true	true	true	true	true	true
+true	true	true	true	true	true	true	true	true	true	true
+true	true	true	true	true	true	true	true	true	true	true
+true	true	true	true	true	true	true	true	true	true	true
+true	true	true	true	true	true	true	true	true	true	true
+true	true	true	true	true	true	true	true	true	true	true
+true	true	true	true	true	true	true	true	true	true	true
+true	true	true	true	true	true	true	true	true	true	true
+true	true	true	true	true	true	true	true	true	true	true
+true	true	true	true	true	true	true	true	true	true	true
+true	true	true	true	true	true	true	true	true	true	true
+true	true	true	true	true	true	true	true	true	true	true
+true	true	true	true	true	true	true	true	true	true	true
+true	true	true	true	true	true	true	true	true	true	true
+true	true	true	true	true	true	true	true	true	true	true
+true	true	true	true	true	true	true	true	true	true	true
+true	true	true	true	true	true	true	true	true	true	true
+true	true	true	true	true	true	true	true	true	true	true
+true	true	true	true	true	true	true	true	true	true	true
+true	true	true	true	true	true	true	true	true	true	true
+true	true	true	true	true	true	true	true	true	true	true
+true	true	true	true	true	true	true	true	true	true	true
+true	true	true	true	true	true	true	true	true	true	true
+true	true	true	true	true	true	true	true	true	true	true
+true	true	true	true	true	true	true	true	true	true	true
+true	true	true	true	true	true	true	true	true	true	true
+true	true	true	true	true	true	true	true	true	true	true
+true	true	true	true	true	true	true	true	true	true	true
+true	true	true	true	true	true	true	true	true	true	true
+true	true	true	true	true	true	true	true	true	true	true
+true	true	true	true	true	true	true	true	true	true	true
+true	true	true	true	true	true	true	true	true	true	true
+true	true	true	true	true	true	true	true	true	true	true
+true	true	true	true	true	true	true	true	true	true	true
+true	true	true	true	true	true	true	true	true	true	true
+true	true	true	true	true	true	true	true	true	true	true
+true	true	true	true	true	true	true	true	true	true	true
+true	true	true	true	true	true	true	true	true	true	true
+true	true	true	true	true	true	true	true	true	true	true
+true	true	true	true	true	true	true	true	true	true	true
+true	true	true	true	true	true	true	true	true	true	true
+true	true	true	true	true	true	true	true	true	true	true
+true	true	true	true	true	true	true	true	true	true	true
+true	true	true	true	true	true	true	true	true	true	true
+true	true	true	true	true	true	true	true	true	true	true
+true	true	true	true	true	true	true	true	true	true	true
+true	true	true	true	true	true	true	true	true	true	true
+true	true	true	true	true	true	true	true	true	true	true
+true	true	true	true	true	true	true	true	true	true	true
+true	true	true	true	true	true	true	true	true	true	true
+true	true	true	true	true	true	true	true	true	true	true
+true	true	true	true	true	true	true	true	true	true	true
+true	true	true	true	true	true	true	true	true	true	true
+true	true	true	true	true	true	true	true	true	true	true
+true	true	true	true	true	true	true	true	true	true	true
 PREHOOK: query: EXPLAIN SELECT 
   fl_date, 
   to_date(date_add(fl_date, 2)), 

http://git-wip-us.apache.org/repos/asf/hive/blob/59539885/ql/src/test/results/clientpositive/show_functions.q.out
----------------------------------------------------------------------
diff --git a/ql/src/test/results/clientpositive/show_functions.q.out b/ql/src/test/results/clientpositive/show_functions.q.out
index 7b746ff..d2f3b97 100644
--- a/ql/src/test/results/clientpositive/show_functions.q.out
+++ b/ql/src/test/results/clientpositive/show_functions.q.out
@@ -68,6 +68,7 @@ date_sub
 datediff
 day
 dayofmonth
+dayofweek
 decode
 default.qtest_get_java_boolean
 degrees


Mime
View raw message