Coder Social home page Coder Social logo

Comments (3)

jbaiera avatar jbaiera commented on August 28, 2024

spark.option("es.field.read.empty.as.null", no)

This field means that an empty string will not be treated as a null value, and thus will attempt to read the empty string as a numeric value. This defaults to true normally and thus the empty string will be parsed as a null value. I would 1) reenable the setting if you need this logic and 2) be careful when storing string data in long types since that can easily lead to confusing errors from the parsing code if they are not valid numerics

from elasticsearch-hadoop.

zzzjx329 avatar zzzjx329 commented on August 28, 2024

tks, I attempted to set this option to true, but I encountered another error.
at org.apache.spark.sql.catalyst.encoders.ExpressionEncoder$Serializer.apply(ExpressionEncoder.scala:213)
at org.apache.spark.sql.catalyst.encoders.ExpressionEncoder$Serializer.apply(ExpressionEncoder.scala:195)
at scala.collection.Iterator$sanon$10.next(Iterator.scala:461)
at org.apache.spark.sql.catalyst.expressions.Generatedclass$GeneratedIteratorforCodegenstagel.processNext(Unknown Source
at org.apache.spark.sql.execution.BufferedRowIterator.hasNext(BufferedRowIterator. java:43)
at org.apache.spark.sql.execution.wholestageCodegenExec$$anon$1.hasNext(wholestageCodegenExec.scala:755)
at org.apache.spark.sql.execution.SparkPlan.$anon fun$getByteArrayRdd$1(SparkPlan.scala:345)
at org.apache.spark.rdd.RDD.$anon fun$mapPartitionsInternal$2(RDD.scala:897)
at org.apache.spark.rdd.RDD.Sanon fun$mapPartitionsInternal$2sadapted(RDD.scala:897
at org.apache.spark.rdd.MapPartitionsRDD.compute(MapPartitionsRDD.scala:52)
at org.apache.spark.rdd.RDD.compute0rReadCheckpoint(RDD.scala:373)
at org.apache.spark.rdd.RDD.iterator (RDD.scala:337)
at org.apache.spark.scheduler.ResultTask.runTask(ResultTask.scala:90
at org.apache.spark.scheduler. Task.run(Task.scala:131)
at org. apache. spark.executor. Executor$TaskRunner. sanonfunsrun$3(Executor.scala:516
at org.apache.spark.util.utilss.trywithSafeFinally(Utils.scala:1604)
at org.apache.spark.executor.Executor$TaskRunner. run(Executor.scala:519)
at java.util.concurrent.ThreadPoolExecutor. runworker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$worker.run(ThreadPoolExecutor.java:624)
at java. lang.Thread.run(Thread.java:750)
Caused by: java.lang.RuntimeException: scala.Nones is not a valid external type for schema of bigint
at org.apache.spark.sql.catalyst.expressions.GeneratedClass$SpecificUnsafeProjection.If 0$(Unknown Source)
at org.apache, spark.sql.catalyst.expressions.GeneratedClasssSpecificUnsafeProjection.writeFields 5$(Unknown Source'
at org.apache.spark.sql.catalyst.expressions.Generatedclass$SpecificUnsafeProjection.apply(Unknown Source)
at org.apache, spark.sql.catalyst.encoders.ExoressionEncodertSerializer.apply(ExpressionEncoder,scala:209)
. 19 more

At first, I set this parameter to true because I reported the above error

from elasticsearch-hadoop.

zzzjx329 avatar zzzjx329 commented on August 28, 2024

Actually, I want to know how to read the data to avoid program errors when dirty data is known to exist, such as through parameter control or any other means.

from elasticsearch-hadoop.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.