Tiago Marques Godinho created IGNITE-27015:
----------------------------------------------
Summary: 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
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)