tkalkirill commented on code in PR #12926:
URL: https://github.com/apache/ignite/pull/12926#discussion_r3026361820
##########
modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/schema/SchemaHolderImpl.java:
##########
@@ -301,12 +311,22 @@ 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);
Review Comment:
Okay, but if I replace it with `RelCollations.EMPTY`, I don't see the index
being used in tests at all.
--
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]