You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ignite.apache.org by ткаленко кирилл <tk...@yandex.ru> on 2026/02/26 09:11:39 UTC
[DISCUSSION] Add rowid and rownum pseudocolumns to Ignite 2 Calcite engine
Hello, igniters!
To migrate a project to Ignite 2 (using Calcite), I'm missing two pseudo-columns like in Oracle: rowid[1] and rownum[2]. Since it's not an ANSI standard, they're missing, as expected.
But I really need them, as there's some legacy code that I can't change.
Any objections to me adding them?
If so, why, and what alternatives are there?
[1] - https://docs.oracle.com/en/database/oracle/oracle-database/26/sqlrf/ROWID-Pseudocolumn.html
[2] - https://docs.oracle.com/en/database/oracle/oracle-database/26/sqlrf/ROWNUM-Pseudocolumn.html
Re: [DISCUSSION] Add rowid and rownum pseudocolumns to Ignite 2 Calcite engine
Posted by Ilya Kasnacheev <il...@apache.org>.
Hello!
I wonder if one could implement a PluginCombinerPlugin which takes
firstPlugin and secondPlugin as two arguments.
My 2c.
Regards,
чт, 5 мар. 2026 г. в 10:08, ткаленко кирилл <tk...@yandex.ru>:
> Thanks, that was very helpful.
>
> As far as I understand, there can only be one plugin that extends the
> configuration. If there are multiple, we'll only get one (the order is
> undefined)?
>
> Perhaps we should add the ability to add multiple plugins?
>
Re: [DISCUSSION] Add rowid and rownum pseudocolumns to Ignite 2 Calcite engine
Posted by Alex Plehanov <pl...@gmail.com>.
Kirill,
There can be multiple plugins. The order is defined by configuration
(setPluginProviders method).
As for Calcite engine FrameworkConfig - there is only one instance
allowed, but one plugin can enrich configuration derived from another
plugin.
чт, 5 мар. 2026 г. в 10:08, ткаленко кирилл <tk...@yandex.ru>:
>
> Thanks, that was very helpful.
>
> As far as I understand, there can only be one plugin that extends the configuration. If there are multiple, we'll only get one (the order is undefined)?
>
> Perhaps we should add the ability to add multiple plugins?
Re:[DISCUSSION] Add rowid and rownum pseudocolumns to Ignite 2 Calcite engine
Posted by ткаленко кирилл <tk...@yandex.ru>.
Thanks, that was very helpful.
As far as I understand, there can only be one plugin that extends the configuration. If there are multiple, we'll only get one (the order is undefined)?
Perhaps we should add the ability to add multiple plugins?
Re: [DISCUSSION] Add rowid and rownum pseudocolumns to Ignite 2 Calcite engine
Posted by Alex Plehanov <pl...@gmail.com>.
See OperatorsExtensionIntegrationTest for extension examples.
вт, 3 мар. 2026 г. в 08:07, ткаленко кирилл <tk...@yandex.ru>:
>
> Hi.
> Can you tell me how to implement an extension for these modifications?
Re:[DISCUSSION] Add rowid and rownum pseudocolumns to Ignite 2 Calcite engine
Posted by ткаленко кирилл <tk...@yandex.ru>.
Hi.
Can you tell me how to implement an extension for these modifications?
Re: [DISCUSSION] Add rowid and rownum pseudocolumns to Ignite 2 Calcite engine
Posted by Alex Plehanov <pl...@gmail.com>.
Hi, Kirill,
1. ROWID in Oracle represents a physical reference to a particular row
in a table. An analogous construct in Ignite would be a combination of
groupId and link (partition + page + item inside the page), but the
link differs between different nodes, I think it's not what you
expect. Our goal is to keep the Ignite SQL dialect concise and avoid
importing all the built-in functions we can see in other DBMSes. If
it's an ANSI standard - it's ok to introduce a function. If it's not a
standard, but commonly used by other DBMSes - sometimes it's ok too.
But ROWID looks like an entity absolutely incompatible with Ignite.
You can implement it in your code as a UDF or extension.
2. ROWNUM it's another Oracle-only column with strange behaviour.
Mostly used for limiting query results (although we've got the LIMIT
keyword for this purpose). Moreover, it introduces constraints
regarding data distribution - we cannot compute ROWNUM across
distributed nodes. I think it makes more sense to support the standard
SQL window function ROW_NUMBER(), but not Oracle-specific ROWNUM.
чт, 26 февр. 2026 г. в 22:32, Vladislav Pyatkov <vl...@gmail.com>:
>
> Hi,
> I have an opinion.
>
> - The rowId could be a way to retrieve an entry for the table by primary
> key, whether the table has a single primary column or multiple ones.
> Currently we have a pseudo-column _key, but it fits for an Ignite-aware
> client. It is difficult to imagine using it in any JDBC client.
> - About rowNum, I do not have a strong opinion, but if Oracle has this
> ability, why do we not have the same?
> But I think it's based on window functions, which are not supported
> currently.
>
>
> On Thu, Feb 26, 2026 at 12:12 PM ткаленко кирилл <tk...@yandex.ru>
> wrote:
>
> > Hello, igniters!
> >
> > To migrate a project to Ignite 2 (using Calcite), I'm missing two
> > pseudo-columns like in Oracle: rowid[1] and rownum[2]. Since it's not an
> > ANSI standard, they're missing, as expected.
> >
> > But I really need them, as there's some legacy code that I can't change.
> >
> > Any objections to me adding them?
> > If so, why, and what alternatives are there?
> >
> > [1] -
> > https://docs.oracle.com/en/database/oracle/oracle-database/26/sqlrf/ROWID-Pseudocolumn.html
> > [2] -
> > https://docs.oracle.com/en/database/oracle/oracle-database/26/sqlrf/ROWNUM-Pseudocolumn.html
> >
>
>
> --
> Vladislav Pyatkov
Re: [DISCUSSION] Add rowid and rownum pseudocolumns to Ignite 2 Calcite engine
Posted by Vladislav Pyatkov <vl...@gmail.com>.
Hi,
I have an opinion.
- The rowId could be a way to retrieve an entry for the table by primary
key, whether the table has a single primary column or multiple ones.
Currently we have a pseudo-column _key, but it fits for an Ignite-aware
client. It is difficult to imagine using it in any JDBC client.
- About rowNum, I do not have a strong opinion, but if Oracle has this
ability, why do we not have the same?
But I think it's based on window functions, which are not supported
currently.
On Thu, Feb 26, 2026 at 12:12 PM ткаленко кирилл <tk...@yandex.ru>
wrote:
> Hello, igniters!
>
> To migrate a project to Ignite 2 (using Calcite), I'm missing two
> pseudo-columns like in Oracle: rowid[1] and rownum[2]. Since it's not an
> ANSI standard, they're missing, as expected.
>
> But I really need them, as there's some legacy code that I can't change.
>
> Any objections to me adding them?
> If so, why, and what alternatives are there?
>
> [1] -
> https://docs.oracle.com/en/database/oracle/oracle-database/26/sqlrf/ROWID-Pseudocolumn.html
> [2] -
> https://docs.oracle.com/en/database/oracle/oracle-database/26/sqlrf/ROWNUM-Pseudocolumn.html
>
--
Vladislav Pyatkov