Eric5553 commented on a change in pull request #27685: [SPARK-30940][SQL]
Remove meaningless attributeId when Explain SQL query
URL: https://github.com/apache/spark/pull/27685#discussion_r386008536
##########
File path: sql/core/src/test/resources/sql-tests/results/explain.sql.out
##########
@@ -65,48 +65,48 @@ struct<plan:string>
(1) Scan parquet default.explain_temp1
-Output [2]: [key#x, val#x]
+Output [2]: [key, val]
Batched: true
Location [not included in comparison]/{warehouse_dir}/explain_temp1]
PushedFilters: [IsNotNull(key), GreaterThan(key,0)]
ReadSchema: struct<key:int,val:int>
(2) ColumnarToRow [codegen id : 1]
-Input [2]: [key#x, val#x]
+Input [2]: [key, val]
(3) Filter [codegen id : 1]
-Input [2]: [key#x, val#x]
-Condition : (isnotnull(key#x) AND (key#x > 0))
+Input [2]: [key, val]
+Condition : (isnotnull(key) AND (key > 0))
(4) Project [codegen id : 1]
-Output [2]: [key#x, val#x]
-Input [2]: [key#x, val#x]
+Output [2]: [key, val]
+Input [2]: [key, val]
(5) HashAggregate [codegen id : 1]
-Input [2]: [key#x, val#x]
-Keys [1]: [key#x]
-Functions [1]: [partial_max(val#x)]
-Aggregate Attributes [1]: [max#x]
-Results [2]: [key#x, max#x]
+Input [2]: [key, val]
+Keys [1]: [key]
+Functions [1]: [partial_max(val)]
+Aggregate Attributes [1]: [max]
+Results [2]: [key, max]
(6) Exchange
-Input [2]: [key#x, max#x]
-Arguments: hashpartitioning(key#x, 4), true, [id=#x]
+Input [2]: [key, max]
+Arguments: hashpartitioning(key, 4), true, [id=#x]
(7) HashAggregate [codegen id : 2]
-Input [2]: [key#x, max#x]
-Keys [1]: [key#x]
-Functions [1]: [max(val#x)]
-Aggregate Attributes [1]: [max(val#x)#x]
Review comment:
I see. Thanks for the review :-)
The common modification in `AttributeReference` will also remove the `#` in
`[max(val)#x]`. I'm trying to pin point to the exact creation place of
auto-generated `AttributeReference` name.
----------------------------------------------------------------
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]