Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for LONG, BINARY types with rust client #75

Open
Callum-A opened this issue Jun 3, 2024 · 3 comments
Open

Support for LONG, BINARY types with rust client #75

Callum-A opened this issue Jun 3, 2024 · 3 comments

Comments

@Callum-A
Copy link

Callum-A commented Jun 3, 2024

Is there an accepted approach in Rust to write LONG / LONG256 / BINARY types using the Buffer's provided?

@amunra
Copy link
Collaborator

amunra commented Jun 4, 2024

The Rust client is an ILP client. ILP is a text protocol that supports a subset of all the QuestDB types: Oher types are targeted via datatypes conversions when the server receives the data.

The general approach here is to issue a SQL CREATE TABLE statement with the desired schema ahead of ingesting into it via the ILP clients.

In other words, if you send an integer, QuestDB will generally "guess" that it's an INT, but you can force it to be a SHORT or a LONG providing a schema in advance.

If you've created the table already, use an ALTER TABLE statement.

  • LONG: This approach should get you sorted for the LONG datatype.
  • BINARY: If you need to insert BINARY data at the moment your only option is to use a PgWire client at the moment.
  • LONG256: There is ILP support (at the protocol level) for LONG256, but it's not implemented yet: https://questdb.io/docs/reference/api/ilp/columnset-types/#long256 - Is this something you'd need? What's your use case around it?

@Callum-A
Copy link
Author

Callum-A commented Jun 5, 2024

It feels like my limitations are mainly with the client then. For example I have a couple u128 types in Rust I'd love to store as LONGs on the table, the DDL part is fine and creating the table works. However due to the lack of a .column_u128 .column_u64 I am unable to store that data via Rust code.

@Callum-A
Copy link
Author

Any update on this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants