You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Yury Gerzhedovich (Jira)" <ji...@apache.org> on 2021/12/14 09:04:00 UTC
[jira] [Commented] (IGNITE-15784) Support custom mapping for fields and column of arbitrary types.
[ https://issues.apache.org/jira/browse/IGNITE-15784?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17458999#comment-17458999 ]
Yury Gerzhedovich commented on IGNITE-15784:
--------------------------------------------
[~amashenkov] , LGTM in general. Let's add JIRA links for TODOs and may be we should think out the possibility ignore case mode for column names at mappers (as a separate ticket).
> Support custom mapping for fields and column of arbitrary types.
> ----------------------------------------------------------------
>
> Key: IGNITE-15784
> URL: https://issues.apache.org/jira/browse/IGNITE-15784
> Project: Ignite
> Issue Type: Improvement
> Components: sql
> Reporter: Andrey Mashenkov
> Assignee: Andrey Mashenkov
> Priority: Major
> Labels: ignite-3
> Fix For: 3.0.0-alpha4
>
> Time Spent: 2h 10m
> Remaining Estimate: 0h
>
> h3. Motivation.
> A user may want to operate with user objects, which types may differ from or incompatible with a column type.
> As a special case, a user may want to transparently serialize an arbitrary object to byte[] (BLOB) column.
> h3. Description.
> To achieve this we can provide an interface for the converter and allow passing custom converters to a mapper.
> The converter acts as an interceptor and transforms a value before writing to/after reading from the column.
> Mapper API should be refactored as well to support this.
> As a PoC, let's add a test with a converter that performs transparent Java serialization arbitrary object to byte[] column.
> Converters and automatic typecasting is out of the scope,
> the goal is to create API and infrastructure for further extension, e.g.
> * provide a standard converter component for cross-platform serialization (based on MessagePack or on IGNITE-15944 ticket ideas)
> * optionally add JSON/BSON format support.
> * add simple converters for supported native types, e.g. Integer<-->String, and possibly, support implicit typecasting.
> * support unsigned types via implicit typecasting mechanics.
--
This message was sent by Atlassian Jira
(v8.20.1#820001)