Coder Social home page Coder Social logo

Comments (4)

nmcdonnell-kx avatar nmcdonnell-kx commented on June 4, 2024

Yeah, that's a tricky one
One simple solution would be to have an option to decode utf8 as symbols but it would apply to all columns in the table which I suspect is not what you want.
Another possibility would be to have a utf8_as_symbol option which only applies to dictionary keys. I think that's possible but again would apply to all dictionary columns in the table.

from arrowkdb.

pporter-jumptrading avatar pporter-jumptrading commented on June 4, 2024

I suspect, that in many use cases treating dictionary encoded strings as symbols always, is exactly the behavior you want. If you have other dictionary encoded types, (ie if you have Uint64 but only use a few of them so they are dictionary encoded that would probably end up turning into the Uint64 but that seems fine.

from arrowkdb.

nmcdonnell-kx avatar nmcdonnell-kx commented on June 4, 2024

I agree that dictionary utf8 values as symbol is a reasonable use case. However, I'm not sure it could be the default - generally users don't like decoding to symbols as the default because of symbol bloat. But I think a DICTIONARY_UTF8_VALUES_AS_SYMBOL option could work for you.

from arrowkdb.

nugend avatar nugend commented on June 4, 2024

A fun extra you can add to your dict encoding is to exclude the null from the dictionary and use a null bit mask to override the find result. These will convert out on the other side to a dictionary with a nullity mask for the index. So you can have separate nullity checks for symbols and character vecs that are isomorphic to the KDB types and your types will all round trip as you expect.

This is also nice because it means the plain utf8 type can skip a nullity vector.

from arrowkdb.

Related Issues (6)

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.