ibessonov commented on code in PR #3589:
URL: https://github.com/apache/ignite-3/pull/3589#discussion_r1561111371
##########
modules/storage-api/src/main/java/org/apache/ignite/internal/storage/index/StorageHashIndexDescriptor.java:
##########
@@ -81,25 +79,29 @@ public String toString() {
private final List<StorageHashIndexColumnDescriptor> columns;
+ private final boolean pk;
+
/**
* Constructor.
*
* @param table Catalog table descriptor.
* @param index Catalog index descriptor.
*/
public StorageHashIndexDescriptor(CatalogTableDescriptor table,
CatalogHashIndexDescriptor index) {
- this(index.id(), extractIndexColumnsConfiguration(table, index));
+ this(index.id(), extractIndexColumnsConfiguration(table, index),
table.primaryKeyIndexId() == index.id());
}
/**
* Creates an Index Descriptor from a given set of columns.
*
* @param indexId Index id.
* @param columns Columns descriptors.
+ * @param pk Primary index flag.
*/
- public StorageHashIndexDescriptor(int indexId,
List<StorageHashIndexColumnDescriptor> columns) {
+ public StorageHashIndexDescriptor(int indexId,
List<StorageHashIndexColumnDescriptor> columns, boolean pk) {
Review Comment:
Why do we use it in production code, if this flag can be calculated from
previous constructor parameters? This doesn't look like constructor that should
be used in production code, I need a justification of its necessity, please
provide it
--
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]