You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Hyukjin Kwon (Jira)" <ji...@apache.org> on 2020/09/21 10:25:00 UTC
[jira] [Comment Edited] (SPARK-32938) Spark can not cast long value
from Kafka
[ https://issues.apache.org/jira/browse/SPARK-32938?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17199313#comment-17199313 ]
Hyukjin Kwon edited comment on SPARK-32938 at 9/21/20, 10:24 AM:
-----------------------------------------------------------------
Can you show the schema of your streaming query? e.g.) {{printSchema()}}
was (Author: hyukjin.kwon):
Can you show the schema of your streaming query? e.g.) \{{printSchema()}}
> Spark can not cast long value from Kafka
> ----------------------------------------
>
> Key: SPARK-32938
> URL: https://issues.apache.org/jira/browse/SPARK-32938
> Project: Spark
> Issue Type: Bug
> Components: Java API, SQL, Structured Streaming
> Affects Versions: 3.0.0
> Environment: Debian 10 (Buster), AMD64
> Spark 3.0.0
> Kafka 2.5.0
> spark-sql-kafka-0-10_2.12
> Reporter: Matthias Seiler
> Priority: Major
>
> Spark seems to be unable to cast the key (or value) part from Kafka to a _{color:#172b4d}long{color}_ value and throws
> {code:java}
> org.apache.spark.sql.AnalysisException: cannot resolve 'CAST(`key` AS BIGINT)' due to data type mismatch: cannot cast binary to bigint;;{code}
>
> {color:#172b4d}See this repo for further investigation:{color} [https://github.com/maseiler/spark-kafka- casting-bug|https://github.com/maseiler/spark-kafka-casting-bug]
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org