Comments (1)
The type mapping requires proto messages to be represented as mixed lists. However, because all your message fields have the same type, q is converting your mixed list to a simple list:
(100f;100f) -> (100 100f) [type 9h]
To prevent this conversion you can insert a generic null at the end of the mixed list which protobufkdb will ignore.
So for lists this should work:
.protobufkdb.serializeArrayFromList[`model.mark.v1.Mark;(100f;100f;::)]
(see the last para in https://code.kx.com/q/interfaces/protobuf/protobuf-types/#protobufq-mapping)
For dictionaries:
.protobufkdb.serializeArrayFromDict[`model.mark.v1.Mark;`latpoint`longpoint`__dummy__!(100f;100f;::)]
(https://code.kx.com/q/interfaces/protobuf/protobuf-types/#representing-messages-as-q-dictionaries , third bullet point)
from protobufkdb.
Related Issues (10)
- Update examples/README.md
- Cannot serialise message where all fields have the same type HOT 1
- Change string and bytes proto field mapping HOT 1
- Dynamic importing problems HOT 1
- Allow alternative proto message representation as kdb dictionaries from field names to field values HOT 1
- 32bit compatibility? HOT 2
- Can we run this on Rhel6 machines? HOT 1
- Docs should be included with release
- Run tests scripts from travis build HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from protobufkdb.