You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "LuciferYang (via GitHub)" <gi...@apache.org> on 2026/04/13 06:39:53 UTC

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

LuciferYang opened a new pull request, #55319:
URL: https://github.com/apache/spark/pull/55319

   ### 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?
   `formatName` surfaces in user-facing error messages (e.g., `UNSUPPORTED_DATA_TYPE_FOR_DATASOURCE`, `INVALID_COLUMN_NAME_AS_PATH`). The mismatch causes the same error to show `"Avro"` under V1 but `"AVRO"` under V2, which is inconsistent.
   
   
   ### Does this PR introduce _any_ user-facing change?
   Yes (minor). Error messages that previously showed `"AVRO"` for V2 Avro tables now show `"Avro"`, matching the V1 behavior.
   
   
   ### 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
   


-- 
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.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


Re: [PR] [SPARK-56457][SQL] Fix Avro V2 formatName to match V1 FileFormat.toString [spark]

Posted by "LuciferYang (via GitHub)" <gi...@apache.org>.
LuciferYang commented on PR #55319:
URL: https://github.com/apache/spark/pull/55319#issuecomment-4237717616

   Thank you @dongjoon-hyun 


-- 
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.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


Re: [PR] [SPARK-56457][SQL] Fix Avro V2 formatName to match V1 FileFormat.toString [spark]

Posted by "dongjoon-hyun (via GitHub)" <gi...@apache.org>.
dongjoon-hyun closed pull request #55319: [SPARK-56457][SQL] Fix Avro V2 formatName to match V1 FileFormat.toString
URL: https://github.com/apache/spark/pull/55319


-- 
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.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


Re: [PR] [SPARK-56457][SQL] Fix Avro V2 formatName to match V1 FileFormat.toString [spark]

Posted by "LuciferYang (via GitHub)" <gi...@apache.org>.
LuciferYang commented on PR #55319:
URL: https://github.com/apache/spark/pull/55319#issuecomment-4234361578

   cc @dongjoon-hyun 


-- 
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.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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