Skip to content

Mapping WrenType to ArrowType #590

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

Closed
goldmedal opened this issue Jun 3, 2024 · 1 comment · Fixed by #720
Closed

Mapping WrenType to ArrowType #590

goldmedal opened this issue Jun 3, 2024 · 1 comment · Fixed by #720
Assignees
Labels
enhancement New feature or request modeling-rs

Comments

@goldmedal
Copy link
Contributor

Description

In the rust version, we're lack many type mapping for arrow type. I only mapped integer and verchar now.

https://github.com/goldmedal/wren-engine/blob/71a92d7c8133c04f4f6ce1b624df1b5027ce200f/wren-modeling-rs/src/logical_plan/utils.rs#L11

There're others remain types should be supported:
https://docs.getwren.ai/engine/reference/fields_types

@goldmedal
Copy link
Contributor Author

We have some type definitions used for getting the metadata of data source in the ibis server.
https://github.com/Canner/wren-engine/blob/main/ibis-server/app/model/metadata/dto.py

Each connector handle their rule for type mapping.

switcher = {
"boolean": WrenEngineColumnType.BOOLEAN,
"int8": WrenEngineColumnType.TINYINT,
"uint8": WrenEngineColumnType.INT2,
"int16": WrenEngineColumnType.INT2,

Mostly, if the type can't be mapped to the WrenType, it would be set to UNKNOWN. Only BigQeury will return the native type of BigQuery.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request modeling-rs
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant