dilipbiswal opened a new pull request #28425:
URL: https://github.com/apache/spark/pull/28425


   ### What changes were proposed in this pull request?
   Improve the EXPLAIN FORMATTED output of DSV2 Scan nodes (file based ones).
   
   **Before**
   ```
   == Physical Plan ==
   * Project (4)
   +- * Filter (3)
      +- * ColumnarToRow (2)
         +- BatchScan (1)
   
   
   (1) BatchScan
   Output [2]: [value#7, id#8]
   Arguments: [value#7, id#8], 
ParquetScan(org.apache.spark.sql.test.TestSparkSession@17477bbb,Configuration: 
core-default.xml, core-site.xml, mapred-default.xml, mapred-site.xml, 
yarn-default.xml, yarn-site.xml, hdfs-default.xml, hdfs-site.xml, 
__spark_hadoop_conf__.xml,org.apache.spark.sql.execution.datasources.InMemoryFileIndex@a6c363ce,StructType(StructField(value,IntegerType,true)),StructType(StructField(value,IntegerType,true)),StructType(StructField(id,IntegerType,true)),[Lorg.apache.spark.sql.sources.Filter;@40fee459,org.apache.spark.sql.util.CaseInsensitiveStringMap@feca1ec6,Vector(isnotnull(id#8),
 (id#8 > 1)),List(isnotnull(value#7), (value#7 > 2)))
   (2) ...
   (3) ...
   (4) ...
   ```
   **After**
   ```
   == Physical Plan ==
   * Project (4)
   +- * Filter (3)
      +- * ColumnarToRow (2)
         +- BatchScan (1)
   
   
   (1) BatchScan
   Output [2]: [value#7, id#8]
   DataFilters: [isnotnull(value#7), (value#7 > 2)]
   Format: parquet
   Location: InMemoryFileIndex[....]
   PartitionFilters: [isnotnull(id#8), (id#8 > 1)]
   PushedFilers: [IsNotNull(id), IsNotNull(value), GreaterThan(id,1), 
GreaterThan(value,2)]
   ReadSchema: struct<value:int>
   (2) ...
   (3) ...
   (4) ...
   ```
   ### Why are the changes needed?
   The old format is not very readable. This improves the readability of the 
plan.
   
   ### Does this PR introduce any user-facing change?
   Yes. the explain output will be different.
   
   ### How was this patch tested?
   Added a test case in ExplainSuite.
   


----------------------------------------------------------------
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:
us...@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to