alex-plekhanov commented on code in PR #12453:
URL: https://github.com/apache/ignite/pull/12453#discussion_r2483158390
##########
modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryProcessor.java:
##########
@@ -1696,8 +1696,21 @@ else if (op instanceof
SchemaAlterTableDropColumnOperation) {
}
}
else if (op instanceof SchemaAddQueryEntityOperation) {
- if (cacheNames.contains(op.cacheName()))
- err = new
SchemaOperationException(SchemaOperationException.CODE_CACHE_ALREADY_INDEXED,
op.cacheName());
+ String cacheSchema = cacheNamesToSchema.get(cacheName);
+
+ if (cacheSchema != null) {
+ if (!Objects.equals(cacheSchema, op.schemaName()))
+ err = new
SchemaOperationException(SchemaOperationException.CODE_INVALID_SCHEMA,
op.schemaName());
+ else {
+ for (QueryTypeIdKey t : types.keySet()) {
Review Comment:
Error should be thrown only for already defined query entity (now we support
create table on top of created cache with SQL schema or defined SQL functions,
but without query entities)
--
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]