aboutsummaryrefslogtreecommitdiff
path: root/sql/hive/src/test
diff options
context:
space:
mode:
authorHerman van Hovell <hvanhovell@databricks.com>2016-11-29 20:05:15 -0800
committerReynold Xin <rxin@databricks.com>2016-11-29 20:05:15 -0800
commitaf9789a4f5d00b3141f102e9f0ca52217e26c082 (patch)
tree99b5e53726166451ccd1a65ced9e010d943e7d2a /sql/hive/src/test
parent9b670bcaec9c220603ec10a6d186865dabf26a5b (diff)
downloadspark-af9789a4f5d00b3141f102e9f0ca52217e26c082.tar.gz
spark-af9789a4f5d00b3141f102e9f0ca52217e26c082.tar.bz2
spark-af9789a4f5d00b3141f102e9f0ca52217e26c082.zip
[SPARK-18632][SQL] AggregateFunction should not implement ImplicitCastInputTypes
## What changes were proposed in this pull request? `AggregateFunction` currently implements `ImplicitCastInputTypes` (which enables implicit input type casting). There are actually quite a few situations in which we don't need this, or require more control over our input. A recent example is the aggregate for `CountMinSketch` which should only take string, binary or integral types inputs. This PR removes `ImplicitCastInputTypes` from the `AggregateFunction` and makes a case-by-case decision on what kind of input validation we should use. ## How was this patch tested? Refactoring only. Existing tests. Author: Herman van Hovell <hvanhovell@databricks.com> Closes #16066 from hvanhovell/SPARK-18632.
Diffstat (limited to 'sql/hive/src/test')
-rw-r--r--sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/TestingTypedCount.scala2
1 files changed, 0 insertions, 2 deletions
diff --git a/sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/TestingTypedCount.scala b/sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/TestingTypedCount.scala
index a3d48d98f8..d27287bad0 100644
--- a/sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/TestingTypedCount.scala
+++ b/sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/TestingTypedCount.scala
@@ -71,8 +71,6 @@ case class TestingTypedCount(
TestingTypedCount.State(dataStream.readLong())
}
- override def inputTypes: Seq[AbstractDataType] = AnyDataType :: Nil
-
override def withNewMutableAggBufferOffset(newMutableAggBufferOffset: Int): ImperativeAggregate =
copy(mutableAggBufferOffset = newMutableAggBufferOffset)