You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ignite.apache.org by "ptupitsyn (via GitHub)" <gi...@apache.org> on 2025/10/06 10:15:27 UTC
Re: [PR] IGNITE-26539 Add support for SQL Schemas [ignite-3]
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