Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-27093

Honor ParseMode in AvroFileFormat

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Major
    • Resolution: Invalid
    • Affects Version/s: 3.1.0
    • Fix Version/s: None
    • Component/s: Input/Output
    • Labels:
      None

      Description

      The Avro reader is missing the ability to handle malformed or truncated files like the JSON reader. Currently it throws exceptions when it encounters any bad or truncated record in an Avro file, causing the entire Spark job to fail from a single dodgy file. 

      Ideally the AvroFileFormat would accept a Permissive or DropMalformed ParseMode like Spark's JSON format. This would enable the the Avro reader to drop bad records and continue processing the good records rather than abort the entire job. 

      Obviously the default could remain as FailFastMode, which is the current effective behavior, so this wouldn’t break any existing users.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                timothyc Tim Cerexhe
              • Votes:
                0 Vote for this issue
                Watchers:
                8 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: