vldpyatkov commented on code in PR #12926:
URL: https://github.com/apache/ignite/pull/12926#discussion_r2994957984
##########
modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/schema/SchemaHolderImpl.java:
##########
@@ -301,12 +301,23 @@ private static Object
affinityIdentity(CacheConfiguration<?, ?> ccfg) {
IndexDescriptor idxDesc
) {
IgniteCacheTable tbl = table(schemaName, tblName);
- assert tbl != null;
+ assert tbl != null : String.format("schemaName=%s, tableName=%s,
idxName=%s", schemaName, tblName, idxName);
RelCollation idxCollation = deriveSecondaryIndexCollation(idxDesc,
tbl);
IgniteIndex idx = new CacheIndexImpl(idxCollation, idxName,
idxDesc.index(), tbl);
tbl.addIndex(idx);
+
+ // For a composite PK index, we need to create another proxy index
that will expand the passed boundaries into
+ // index keys for BinaryObject/Key classes. That is, _key ->
idx_field_0, idx_field_1, etc.
+ if (idxDesc.isPk() && idxDesc.isComposite()) {
+ RelCollation keyFieldCollation = deriveKeyFieldIndexCollation(tbl);
+
+ IgniteIndex keyProxyIdx = new CacheIndexImpl(
+ keyFieldCollation, idxName + "_proxy", idxDesc.index(), tbl,
idxCollation.getKeys(), true
Review Comment:
I do not see a code that moves a proxy to an altered table.
onColumnsAdded / onColumnsDropped
Both methods use a default CacheIndexImpl constructor.
--
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]