[ 
https://issues.apache.org/jira/browse/IGNITE-27015?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Pavel Pereslegin updated IGNITE-27015:
--------------------------------------
    Release Note: The system virtual column for SQL partition filtering has 
been renamed from __PART to __PARTITION_ID and its type upgraded from INT32 to 
INT64. The old name __PART is now deprecated.

> Introduce new "__PARTITION_ID" column virtual column
> ----------------------------------------------------
>
>                 Key: IGNITE-27015
>                 URL: https://issues.apache.org/jira/browse/IGNITE-27015
>             Project: Ignite
>          Issue Type: Improvement
>          Components: sql ai3
>    Affects Versions: 3.1
>            Reporter: Tiago Marques Godinho
>            Assignee: Pavel Pereslegin
>            Priority: Major
>              Labels: ignite-3
>             Fix For: 3.2
>
>          Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> Since the address space for Partition Ids is going to be increased to 
> LONG/BIGINT in the future, we need to update the SQL virtual column that maps 
> this value.
> What to do:
> * Introduce a new SQL virtual column `__PARTITION_ID` (BIGINT) mapped to the 
> partition of the record.
> * Deprecate previous column that mapped to the Partition Id, such as `__PART`.
> * `__PARTITION_ID` be usable in filters as well.
> * `__PARTITION_ID` must be filterable with a `IN` clause when support for 
> arrays is rolled out.
> Notes:
> Example 1:
> {code:java}
> // Compute job implementation
> CompletableFuture<R> executeAsync(JobExecutionContext context, @Nullable T 
> arg) {
> Partition part = context.partition();
> ignite.sql().execute("SELECT * FROM foo WHERE foo.__PARTITION_ID = ?", 
> part.id());
>       ...
> }
> {code}
> Example 2:
> {code:java}
> List<Long> partIds = ...
> ignite.sql().execute("SELECT * FROM foo WHERE foo.__PARTITION_ID IN ?", 
> partIds);
> {code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to