[ https://issues.apache.org/jira/browse/IGNITE-24211?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Andrey Mashenkov updated IGNITE-24211: -------------------------------------- Description: The issue was introduced in IGNITE-21295 by adding an invalid method to Catalog for accessing table by "canonical name", and a cache for "canonical table name" -> tableDescriptor. As for now, ignite-rest and ignite-table modules gets table for Catalog object by "canonical name" as concatenation of schemaName and tableName via dot-notation without any escaping. This is incorrect. E.g. the next case with 2 tables and 2 schemas is valid, but will not work: Table[schemaName="A", tableName="B.C"] and Table[schemaName="A.B", tableName="C"] Let's drop invalid method and cache, use 2 separate arguments for schema and table names and avoid concatenation. was: Catalog object is an internal container for descriptors and wasn't designed to be used directly outside the module. The class has public modifier just to allow Catalog commands access it from the different package of the same (ignite-catalog) module moved for better code organization. Now, ignite-rest and ignite-table modules access Catalog object directly. Moreover, they exploits it's internals in wrong way: cache table descriptors by "canonical name" as concatenation of schemaName and tableName via dot notation without escaping. Let's avoid direct using of Catalog objects. > Sql. Fix invalid qualified name usage in Catalog object. > -------------------------------------------------------- > > Key: IGNITE-24211 > URL: https://issues.apache.org/jira/browse/IGNITE-24211 > Project: Ignite > Issue Type: Bug > Components: sql > Reporter: Andrey Mashenkov > Assignee: Andrey Mashenkov > Priority: Major > Labels: ignite-3, tech-debt > Fix For: 3.1 > > Time Spent: 10m > Remaining Estimate: 0h > > The issue was introduced in IGNITE-21295 by adding an invalid method to > Catalog for accessing table by "canonical name", and a cache for "canonical > table name" -> tableDescriptor. > As for now, ignite-rest and ignite-table modules gets table for Catalog > object by "canonical name" as concatenation of schemaName and tableName via > dot-notation without any escaping. > This is incorrect. > E.g. the next case with 2 tables and 2 schemas is valid, but will not work: > Table[schemaName="A", tableName="B.C"] and Table[schemaName="A.B", > tableName="C"] > Let's drop invalid method and cache, use 2 separate arguments for schema and > table names and avoid concatenation. -- This message was sent by Atlassian Jira (v8.20.10#820010)