Skip to content

[AURON #1665] Override verboseStringWithOperatorId in NativeFileSourceScanBase#1643

Merged
richox merged 6 commits intoapache:masterfrom
yew1eb:AURON_1642
Dec 1, 2025
Merged

[AURON #1665] Override verboseStringWithOperatorId in NativeFileSourceScanBase#1643
richox merged 6 commits intoapache:masterfrom
yew1eb:AURON_1642

Conversation

@yew1eb
Copy link
Contributor

@yew1eb yew1eb commented Nov 20, 2025

Which issue does this PR close?

Close #1665.

Rationale for this change

  • Align NativeFileSourceScanBase verbose string output with Spark to improve readability and debugging.

What changes are included in this PR?

Are there any user-facing changes?

  • Yes: operator verbose string output aligns with Spark.

How was this patch tested?

  • Manual checks on sample queries.
  • Future work: introduce a TPCH/TPCDS plan stability suite to continuously validate formatting stability.

Vanilla Spark:
image

Master:
Pasted Graphic 2

PR:
Pasted Graphic 1

@github-actions github-actions bot added the spark label Nov 20, 2025
@yew1eb
Copy link
Contributor Author

yew1eb commented Nov 26, 2025

@merrily01 @richox the NativeFileSourceScan's explain ouput currently diverges from vanilla spark and forces all metadata into a truncated "Arguments" line that loses information. this change mirrors vanilla spark' formatting exactly, so it have no side effects.

@yew1eb yew1eb changed the title [AURON #1642] Align NativeFileSourceScanBase.verboseStringWithOperatorId with vanilla Spark [AURON #1642] Override verboseStringWithOperatorId in NativeFileSourceScanBase Nov 26, 2025
@yew1eb yew1eb changed the title [AURON #1642] Override verboseStringWithOperatorId in NativeFileSourceScanBase [AURON #1665] Align NativeFileSourceScanBase.verboseStringWithOperatorId with vanilla Spark Nov 26, 2025
@yew1eb yew1eb changed the title [AURON #1665] Align NativeFileSourceScanBase.verboseStringWithOperatorId with vanilla Spark [AURON #1665] Override verboseStringWithOperatorId in NativeFileSourceScanBase Nov 26, 2025
Copy link
Member

@zuston zuston left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm. Left minor comment


override protected def doCanonicalize(): SparkPlan = basedFileScan.canonicalized

override def verboseStringWithOperatorId(): String = {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you add the reference url of spark in comment for better understanding ?

*/
override def verboseStringWithOperatorId(): String = {
val metadataStr = basedFileScan.metadata.toSeq.sorted
.filterNot {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: How about call super.verboseStringWithOperatorId and replace the nodeName, it might be simpler. The code here seems a little complicated which is almost identical to super.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you directly use the upstream method? If so, it's pretty nice

@richox richox merged commit 02cde12 into apache:master Dec 1, 2025
98 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Improve verbose string output for all Native*Exec operators to match Spark

4 participants