Giter VIP home page Giter VIP logo

Comments (11)

HyukjinKwon avatar HyukjinKwon commented on September 18, 2024 1

Thanks all!

from pickle.

xinrong-meng avatar xinrong-meng commented on September 18, 2024 1

Thank you, that's very helpful!

from pickle.

Yikun avatar Yikun commented on September 18, 2024 1

I do some local test, it works! It would be fixed in apache/spark#34285 in Spark.

Much thanks for your awesome help! @irmen

from pickle.

irmen avatar irmen commented on September 18, 2024

We can't make BigDecimal represent a NaN

I guess we can :

  • map it into a float NaN
  • or throw a better exception (NumberFormatException?)

I'll have a look if the first option is viable. However this means that you won't always get a BigDecimal object as a result of unpickling a python decimal. However I guess a Decimal NaN occurs very infrequently and if you need to support it it should be easy enough to test the type of the resulting object.

The same issue appears in the .NET version of the code btw.

from pickle.

irmen avatar irmen commented on September 18, 2024

@Yikun

Decimal("NaN") is now unpickled as Double.NaN. 2809d25

This is now released in pickle version 1.2.

from pickle.

Yikun avatar Yikun commented on September 18, 2024

@irmen Woow, thanks, might it posible backport this PR to https://github.com/irmen/Pyrolite and release a 4.32 version?

from pickle.

irmen avatar irmen commented on September 18, 2024

No, it would be a 5.2 version in that case because currently it's at 5.1. But since 5.0 pickle is no longer part of Pyrolite itself.
However I believe you’re only using the pickle part of pyrolite yeah? The way forward should be, I think, to replace pyrolite by just this pickle library. ?

from pickle.

irmen avatar irmen commented on September 18, 2024

@Yikun ping , not sure if you're read my reply above (because I haven't seen a change in the status of the ticked on the Spark issue tracker.)

from pickle.

HyukjinKwon avatar HyukjinKwon commented on September 18, 2024

Thanks for pinging @irmen! Seems like the backport isn't an option here, seems like the way we could try here is to replace to this pickle library.

from pickle.

Yikun avatar Yikun commented on September 18, 2024

@irmen Much thanks for your answer, I missed it before. And I will also try to switch pyrolite to pickle on spark upstream.

from pickle.

irmen avatar irmen commented on September 18, 2024

Yeah that should be the way to go. I don't believe you were using any of the non pickle related functions from the pyrolite library before so I think it should be fairly straightforward to switch?

from pickle.

Related Issues (13)

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.