Github user cloud-fan commented on a diff in the pull request:
https://github.com/apache/spark/pull/21682#discussion_r201218002
--- Diff:
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/parquet/ParquetFilters.scala
---
@@ -60,8 +62,10 @@ private[parquet] class ParquetFilters(pushDownDate:
Boolean, pushDownStartWith:
private val makeEq: PartialFunction[ParquetSchemaType, (String, Any) =>
FilterPredicate] = {
case ParquetBooleanType =>
(n: String, v: Any) => FilterApi.eq(booleanColumn(n),
v.asInstanceOf[java.lang.Boolean])
- case ParquetIntegerType =>
- (n: String, v: Any) => FilterApi.eq(intColumn(n),
v.asInstanceOf[Integer])
+ case ParquetByteType | ParquetShortType | ParquetIntegerType =>
--- End diff --
since we have a way to distinguish byte/short/int with parquet physical
type, let's just write a case for each of them, and cast to the corrected type
directly.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]