Log workAgile BoardRank to TopRank to BottomAttach filesAttach ScreenshotBulk Copy AttachmentsBulk Move AttachmentsVotersWatch issueWatchersConvert to IssueMoveLinkCloneLabelsUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete CommentsDelete
    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Resolved
    • Major
    • Resolution: Won't Fix
    • 3.2.0
    • None
    • SQL
    • None

    Description

      The use case is:

      spark.sql("create table t1 using parquet as select id as a, id as b from range(10)")
      spark.sql("select * from t1 where CASE WHEN a > 2 THEN b + 10 END > 5").explain()
      

      Before this pr:

      == Physical Plan ==
      *(1) Filter CASE WHEN (a#3L > 2) THEN ((b#4L + 10) > 5) END
      +- *(1) ColumnarToRow
         +- FileScan parquet default.t1[a#3L,b#4L] Batched: true, DataFilters: [CASE WHEN (a#3L > 2) THEN ((b#4L + 10) > 5) END], Format: Parquet, Location: InMemoryFileIndex[file:/Users/yumwang/opensource/spark/spark-warehouse/org.apache.spark.sql.DataF..., PartitionFilters: [], PushedFilters: [], ReadSchema: struct<a:bigint,b:bigint>
      
      

      After this pr:

      == Physical Plan ==
      *(1) Filter (((isnotnull(a#3L) AND isnotnull(b#4L)) AND (a#3L > 2)) AND ((b#4L + 10) > 5))
      +- *(1) ColumnarToRow
         +- FileScan parquet default.t1[a#3L,b#4L] Batched: true, DataFilters: [isnotnull(a#3L), isnotnull(b#4L), (a#3L > 2), ((b#4L + 10) > 5)], Format: Parquet, Location: InMemoryFileIndex[file:/Users/yumwang/opensource/spark/spark-warehouse/org.apache.spark.sql.DataF..., PartitionFilters: [], PushedFilters: [IsNotNull(a), IsNotNull(b), GreaterThan(a,2)], ReadSchema: struct<a:bigint,b:bigint>
      
      

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            Unassigned Unassigned Assign to me
            yumwang Yuming Wang
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment