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

Spark can not cast long value from Kafka

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Invalid
    • 3.0.0
    • None
    • None
    • Debian 10 (Buster), AMD64

      Spark 3.0.0

      Kafka 2.5.0

      spark-sql-kafka-0-10_2.12

    Description

      Spark seems to be unable to cast the key (or value) part from Kafka to a long value and throws

      org.apache.spark.sql.AnalysisException: cannot resolve 'CAST(`key` AS BIGINT)' due to data type mismatch: cannot cast binary to bigint;;

       

      See this repo for further investigation: https://github.com/maseiler/spark-kafka- casting-bug

      Attachments

        Activity

          People

            Unassigned Unassigned
            maseiler Matthias Seiler
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: