yujhe commented on issue #26807: [SPARK-30181][SQL] Only add string or integral type column to metastore partition filter URL: https://github.com/apache/spark/pull/26807#issuecomment-566479538 You are right! The bug is fixed in the latest branch-2.4. Here's the result in latest branch-2.4 ``` scala> spark.sql("select * from timestamp_part where dt >= '2019-12-01 00:00:00'").explain(true) == Parsed Logical Plan == 'Project [*] +- 'Filter ('dt >= 2019-12-01 00:00:00) +- 'UnresolvedRelation `timestamp_part` == Analyzed Logical Plan == id: int, value: int, dt: timestamp Project [id#16, value#17, dt#18] +- Filter (cast(dt#18 as string) >= 2019-12-01 00:00:00) +- SubqueryAlias `default`.`timestamp_part` +- Relation[id#16,value#17,dt#18] parquet == Optimized Logical Plan == Project [id#16, value#17, dt#18] +- Filter (isnotnull(dt#18) && (cast(dt#18 as string) >= 2019-12-01 00:00:00)) +- Relation[id#16,value#17,dt#18] parquet ```
---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
