alex-plekhanov commented on code in PR #10080:
URL: https://github.com/apache/ignite/pull/10080#discussion_r915977421
##########
modules/core/src/main/java/org/apache/ignite/internal/cache/query/index/sorted/QueryIndexRowHandler.java:
##########
@@ -98,68 +108,45 @@ public List<IndexColumn> getH2IdxColumns() {
/** */
private Object getKey(int idx, CacheDataRow row) {
- int cacheIdx = h2IdxColumns.get(idx).column.getColumnId();
+ int colId = keyColumns.get(idx);
- if (cacheDesc.isKeyColumn(cacheIdx))
- return key(row);
+ if (rowDescriptor.isKeyColumn(colId))
+ return unwrap(row.key());
- else if (cacheDesc.isValueColumn(cacheIdx))
- return value(row);
+ else if (rowDescriptor.isValueColumn(colId))
+ return unwrap(row.value());
- // columnValue ignores default columns (_KEY, _VAL), so make this
shift.
- return cacheDesc.columnValue(row.key(), row.value(), cacheIdx -
QueryUtils.DEFAULT_COLUMNS_COUNT);
+ // getFieldValue ignores default columns (_KEY, _VAL), so make this
shift.
+ return rowDescriptor.getFieldValue(row.key(), row.value(), colId -
QueryUtils.DEFAULT_COLUMNS_COUNT);
}
/** {@inheritDoc} */
@Override public int partition(CacheDataRow row) {
- Object key = key(row);
+ Object key = unwrap(row.key());
- return cacheDesc.context().affinity().partition(key);
+ return rowDescriptor.context().affinity().partition(key);
Review Comment:
I'm not sure KeyCacheObject always has precalculated partition here. I can
try to change it and run TC, if there will be no failures we can leave this
change, but it still risky.
--
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]