This is an automated email from the ASF dual-hosted git repository.
twalthr pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/flink.git
The following commit(s) were added to refs/heads/master by this push:
new 26f5476 [hotfix][table-planner] Remove unnused Quarter case class
26f5476 is described below
commit 26f5476c977068622813d6ea836b9ef5450133df
Author: Timo Walther <[email protected]>
AuthorDate: Thu Feb 28 13:07:56 2019 +0100
[hotfix][table-planner] Remove unnused Quarter case class
The API for this was already changed in FLINK-6846.
---
.../org/apache/flink/table/expressions/time.scala | 27 ----------------------
.../flink/table/validate/FunctionCatalog.scala | 1 -
2 files changed, 28 deletions(-)
diff --git
a/flink-table/flink-table-planner/src/main/scala/org/apache/flink/table/expressions/time.scala
b/flink-table/flink-table-planner/src/main/scala/org/apache/flink/table/expressions/time.scala
index f860492..fe07108 100644
---
a/flink-table/flink-table-planner/src/main/scala/org/apache/flink/table/expressions/time.scala
+++
b/flink-table/flink-table-planner/src/main/scala/org/apache/flink/table/expressions/time.scala
@@ -197,33 +197,6 @@ case class LocalTime() extends
CurrentTimePoint(SqlTimeTypeInfo.TIME, local = tr
case class LocalTimestamp() extends
CurrentTimePoint(SqlTimeTypeInfo.TIMESTAMP, local = true)
/**
- * Extracts the quarter of a year from a SQL date.
- */
-case class Quarter(child: Expression) extends UnaryExpression with
InputTypeSpec {
-
- override private[flink] def expectedTypes: Seq[TypeInformation[_]] =
Seq(SqlTimeTypeInfo.DATE)
-
- override private[flink] def resultType: TypeInformation[_] = LONG_TYPE_INFO
-
- override def toString: String = s"($child).quarter()"
-
- override private[flink] def toRexNode(implicit relBuilder: RelBuilder):
RexNode = {
- /**
- * Standard conversion of the QUARTER operator.
- * Source:
[[org.apache.calcite.sql2rel.StandardConvertletTable#convertQuarter()]]
- */
- Plus(
- Div(
- Minus(
- Extract(TimeIntervalUnit.MONTH, child),
- Literal(1L)),
- Literal(TimeUnit.QUARTER.multiplier.longValue())),
- Literal(1L)
- ).toRexNode
- }
-}
-
-/**
* Determines whether two anchored time intervals overlap.
*/
case class TemporalOverlaps(
diff --git
a/flink-table/flink-table-planner/src/main/scala/org/apache/flink/table/validate/FunctionCatalog.scala
b/flink-table/flink-table-planner/src/main/scala/org/apache/flink/table/validate/FunctionCatalog.scala
index 658d94c..142e2210 100644
---
a/flink-table/flink-table-planner/src/main/scala/org/apache/flink/table/validate/FunctionCatalog.scala
+++
b/flink-table/flink-table-planner/src/main/scala/org/apache/flink/table/validate/FunctionCatalog.scala
@@ -262,7 +262,6 @@ object FunctionCatalog {
"currentTimestamp" -> classOf[CurrentTimestamp],
"localTime" -> classOf[LocalTime],
"localTimestamp" -> classOf[LocalTimestamp],
- "quarter" -> classOf[Quarter],
"temporalOverlaps" -> classOf[TemporalOverlaps],
"dateTimePlus" -> classOf[Plus],
"dateFormat" -> classOf[DateFormat],