Github user viirya commented on a diff in the pull request:
https://github.com/apache/spark/pull/21240#discussion_r186263913
--- Diff:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/TypeCoercion.scala
---
@@ -702,6 +703,21 @@ object TypeCoercion {
}
}
+ /**
+ * Coerces first argument in ReplicateRows expression and introduces a
cast to Long
+ * if necessary.
+ */
+ object ReplicateRowsCoercion extends TypeCoercionRule {
+ private val acceptedTypes = Seq(LongType, IntegerType, ShortType,
ByteType)
--- End diff --
nit: `LongType` seems not necessary be here. Can avoid re-entering the
following pattern matching if it is already long type.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]