Giter Site home page Giter Site logo

Make TDigest serializable about t-digest HOT 2 CLOSED

tdunning avatar tdunning commented on May 25, 2024 5
Make TDigest serializable

from t-digest.

Comments (2)

tdunning avatar tdunning commented on May 25, 2024

Hmm...

I really dislike what Serializable does to code. It is definitely
important to have a way to save data, but it tends to make things really
brittle.

How bad is this for you?

On Sun, Apr 5, 2015 at 4:57 PM, Grega Kespret [email protected]
wrote:

I was wondering why TDigest is not Serializable. I found myself writing
some boilerplate code to serialize/deserialize it when using it in Spark
and it would be cool if it was serializable by default. This is what I have
to do now:

def serialize(tdigest: TDigest) = {
val arr = new ArrayByte
tdigest.asBytes(ByteBuffer.wrap(arr))
arr
}

def deserialize(arr: Array[Byte]) = {
AVLTreeDigest.fromBytes(ByteBuffer.wrap(arr))
}

Do you have any thoughts on that? I could submit a PR for this if you
think it'd be useful.


Reply to this email directly or view it on GitHub
#47.

from t-digest.

gregakespret avatar gregakespret commented on May 25, 2024

It's not that bad, I have a working solution and can continue to use it (code above).

from t-digest.

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.