Skip to content

[SPARK-56457][SQL] Fix Avro V2 formatName to match V1 FileFormat.toString#55319

Closed
LuciferYang wants to merge 1 commit intoapache:masterfrom
LuciferYang:SPARK-56457
Closed

[SPARK-56457][SQL] Fix Avro V2 formatName to match V1 FileFormat.toString#55319
LuciferYang wants to merge 1 commit intoapache:masterfrom
LuciferYang:SPARK-56457

Conversation

@LuciferYang
Copy link
Copy Markdown
Contributor

@LuciferYang LuciferYang commented Apr 13, 2026

What changes were proposed in this pull request?

Fix AvroTable.formatName from "AVRO" to "Avro" to match the V1 AvroFileFormat.toString value. Add regression tests verifying V1/V2 format name consistency for all built-in file formats.

All other built-in file formats already have consistent naming between V1 FileFormat.toString and V2 FileTable.formatName:

Format V1 toString V2 formatName Match
Parquet Parquet Parquet Yes
ORC ORC ORC Yes
JSON JSON JSON Yes
CSV CSV CSV Yes
Text Text Text Yes
Avro Avro AVRO No

"Avro" is not an acronym (unlike ORC/JSON/CSV); the Apache Avro project uses title case everywhere (https://avro.apache.org/).

Why are the changes needed?

Follow the existing format precedent for consistency.

Does this PR introduce any user-facing change?

Yes (minor). The formatName for AvroTable was originally displayed as AVRO and is now shown as Avro.

How was this patch tested?

  • New test in FileTableSuite: verifies FileTable.formatName matches FileFormat.toString for all built-in formats (parquet, orc, json, csv, text).
  • New test in AvroV2Suite: same check for avro.

Was this patch authored or co-authored using generative AI tooling?

Generated-by: Claude Code

@LuciferYang
Copy link
Copy Markdown
Contributor Author

cc @dongjoon-hyun

Copy link
Copy Markdown
Member

@dongjoon-hyun dongjoon-hyun left a comment

Choose a reason for hiding this comment

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

+1, LGTM. Thank you, @LuciferYang .

@LuciferYang
Copy link
Copy Markdown
Contributor Author

Thank you @dongjoon-hyun

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants