dejankrak-db commented on code in PR #56992:
URL: https://github.com/apache/spark/pull/56992#discussion_r3634535958
##########
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/orc/OrcFilters.scala:
##########
@@ -142,13 +143,17 @@ private[sql] object OrcFilters extends OrcFiltersBase {
def getPredicateLeafType(dataType: DataType): PredicateLeaf.Type = dataType
match {
case BooleanType => PredicateLeaf.Type.BOOLEAN
case ByteType | ShortType | IntegerType | LongType |
- _: AnsiIntervalType | TimestampNTZType | _: TimeType =>
PredicateLeaf.Type.LONG
+ _: AnsiIntervalType | TimestampNTZType => PredicateLeaf.Type.LONG
case FloatType | DoubleType => PredicateLeaf.Type.FLOAT
case StringType => PredicateLeaf.Type.STRING
case DateType => PredicateLeaf.Type.DATE
case TimestampType => PredicateLeaf.Type.TIMESTAMP
case _: DecimalType => PredicateLeaf.Type.DECIMAL
- case _ => throw
QueryExecutionErrors.unsupportedOperationForDataTypeError(dataType)
+ // Framework types (e.g. TimeType) supply their own predicate-leaf type. A
framework type whose
+ // predicateLeafType is None (like the nanos-timestamp types), or any
other unmapped type,
+ // reaches the same unsupported-type error as before this change.
Review Comment:
Consider updating the comment/wording so that this part makes sense even
when observed outside of the context of this PR ("this change" doesn't mean
much after you merge the PR).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]