Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-22384

Refine partition pruning when attribute is wrapped in Cast

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.2.0
    • 2.4.0
    • SQL
    • None

    Description

      Sql below will get all partitions from metastore, which put much burden on metastore;
      CREATE TABLE test (value INT) PARTITIONED BY (dt STRING)
      SELECT * from test where dt=2017

      The reason is that the the analyzed attribute dt is wrapped in Cast and HiveShim fails to generate a proper partition filter.

      Could we fix this? Sql like SELECT * from test where dt=2017 is common in my warehouse.

      Attachments

        Activity

          People

            jinxing6042@126.com Jin Xing
            jinxing6042@126.com Jin Xing
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: