You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ignite.apache.org by "tmgodinho (via GitHub)" <gi...@apache.org> on 2025/09/28 10:21:35 UTC

[PR] IGNITE-26539 Add support for SQL Schemas [ignite-3]

tmgodinho opened a new pull request, #6664:
URL: https://github.com/apache/ignite-3/pull/6664

   Ticket: https://issues.apache.org/jira/browse/IGNITE-26539
   
   Commits:
   * Update integration tests to account for schemas
   * Add support for Schemas
   
   This PR must be merged after https://issues.apache.org/jira/browse/IGNITE-26520.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@ignite.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] IGNITE-26539 Add support for SQL Schemas [ignite-3]

Posted by "ptupitsyn (via GitHub)" <gi...@apache.org>.
ptupitsyn commented on code in PR #6664:
URL: https://github.com/apache/ignite-3/pull/6664#discussion_r2405601459


##########
migration-tools/modules/migration-tools-commons/src/main/java/org/apache/ignite/migrationtools/sql/SqlDdlGenerator.java:
##########
@@ -608,6 +608,18 @@ private Entry(
         return new QueryEntityEvaluation(qe, keyFieldToColumnMap, valFieldToColumnMap);
     }
 
+    /**
+     * Computes the cache qualified name from a cache configuration.
+     *
+     * @param cacheCfg Cache configuration.
+     * @return Qualified Name.
+     */
+    public static QualifiedName qualifiedName(CacheConfiguration<?, ?> cacheCfg) {
+        String schema = Optional.ofNullable(cacheCfg.getSqlSchema()).orElse(QualifiedName.DEFAULT_SCHEMA_NAME);
+        String tableName = IgniteNameUtils.quoteIfNeeded(cacheCfg.getName());
+        return QualifiedName.of(schema, tableName);

Review Comment:
   ```suggestion
           return QualifiedName.of(cacheCfg.getSqlSchema(), cacheCfg.getName());
   ```
   
   1. `QualifiedName.of` already handles null schema
   2. `quoteIfNeeded` should not be required here



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@ignite.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] IGNITE-26539 Add support for SQL Schemas [ignite-3]

Posted by "ptupitsyn (via GitHub)" <gi...@apache.org>.
ptupitsyn commented on code in PR #6664:
URL: https://github.com/apache/ignite-3/pull/6664#discussion_r2405601459


##########
migration-tools/modules/migration-tools-commons/src/main/java/org/apache/ignite/migrationtools/sql/SqlDdlGenerator.java:
##########
@@ -608,6 +608,18 @@ private Entry(
         return new QueryEntityEvaluation(qe, keyFieldToColumnMap, valFieldToColumnMap);
     }
 
+    /**
+     * Computes the cache qualified name from a cache configuration.
+     *
+     * @param cacheCfg Cache configuration.
+     * @return Qualified Name.
+     */
+    public static QualifiedName qualifiedName(CacheConfiguration<?, ?> cacheCfg) {
+        String schema = Optional.ofNullable(cacheCfg.getSqlSchema()).orElse(QualifiedName.DEFAULT_SCHEMA_NAME);
+        String tableName = IgniteNameUtils.quoteIfNeeded(cacheCfg.getName());
+        return QualifiedName.of(schema, tableName);

Review Comment:
   ```suggestion
           return QualifiedName.of(cacheCfg.getSqlSchema(), cacheCfg.getName());
   ```
   
   1. `QualifiedName` already handles null schema
   2. `quoteIfNeeded` should not be required here



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@ignite.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] IGNITE-26539 Add support for SQL Schemas [ignite-3]

Posted by "ptupitsyn (via GitHub)" <gi...@apache.org>.
ptupitsyn merged PR #6664:
URL: https://github.com/apache/ignite-3/pull/6664


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@ignite.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] IGNITE-26539 Add support for SQL Schemas [ignite-3]

Posted by "tmgodinho (via GitHub)" <gi...@apache.org>.
tmgodinho commented on code in PR #6664:
URL: https://github.com/apache/ignite-3/pull/6664#discussion_r2406628187


##########
migration-tools/modules/migration-tools-commons/src/main/java/org/apache/ignite/migrationtools/sql/SqlDdlGenerator.java:
##########
@@ -608,6 +608,18 @@ private Entry(
         return new QueryEntityEvaluation(qe, keyFieldToColumnMap, valFieldToColumnMap);
     }
 
+    /**
+     * Computes the cache qualified name from a cache configuration.
+     *
+     * @param cacheCfg Cache configuration.
+     * @return Qualified Name.
+     */
+    public static QualifiedName qualifiedName(CacheConfiguration<?, ?> cacheCfg) {
+        String schema = Optional.ofNullable(cacheCfg.getSqlSchema()).orElse(QualifiedName.DEFAULT_SCHEMA_NAME);
+        String tableName = IgniteNameUtils.quoteIfNeeded(cacheCfg.getName());
+        return QualifiedName.of(schema, tableName);

Review Comment:
   Hi @ptupitsyn,
   I've checked and quoteIfNeeded is indeed required. The `QualifiedName` API behaves like a SQL processor. It will not respect casing unless properly quoted.
   I've double checked the API Docs and they seem clear about it.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@ignite.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org