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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to