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

Avro should read decimal values with the file schema

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 2.4.7, 3.0.1, 3.1.1, 3.2.0
    • Fix Version/s: 2.4.8, 3.0.2, 3.1.1
    • Component/s: SQL
    • Labels:

      Description

      scala> sql("SELECT 3.14 a").write.format("avro").save("/tmp/avro")
      scala> spark.read.schema("a DECIMAL(4, 3)").format("avro").load("/tmp/avro").show
      +-----+
      |    a|
      +-----+
      |0.314|
      +-----+ 

        Attachments

          Activity

            People

            • Assignee:
              dongjoon Dongjoon Hyun
              Reporter:
              dongjoon Dongjoon Hyun
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: