Skip to content

Conversation

@alex-plekhanov
Copy link
Contributor

Thank you for submitting the pull request to the Apache Ignite.

In order to streamline the review of the contribution
we ask you to ensure the following steps have been taken:

The Contribution Checklist

  • There is a single JIRA ticket related to the pull request.
  • The web-link to the pull request is attached to the JIRA ticket.
  • The JIRA ticket has the Patch Available state.
  • The pull request body describes changes that have been made.
    The description explains WHAT and WHY was made instead of HOW.
  • The pull request title is treated as the final commit message.
    The following pattern must be used: IGNITE-XXXX Change summary where XXXX - number of JIRA issue.
  • A reviewer has been mentioned through the JIRA comments
    (see the Maintainers list)
  • The pull request has been checked by the Teamcity Bot and
    the green visa attached to the JIRA ticket (see TC.Bot: Check PR)

Notes

If you need any help, please email [email protected] or ask anу advice on http://asf.slack.com #ignite channel.

@sonarqubecloud
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
20 New Code Smells (required ≤ 1)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

rowType = desc.rowType(ectx.getTypeFactory(), requiredColumns);
factory = ectx.rowHandler().factory(ectx.getTypeFactory(), rowType);

ImmutableBitSet reqCols = requiredColumns == null ? ImmutableBitSet.range(0, rowType.getFieldCount())
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor codestyle. I would prefer:

        ImmutableBitSet reqCols = requiredColumns == null 
            ? ImmutableBitSet.range(0, rowType.getFieldCount())
            : requiredColumns;

/**
* Interface to iterate over raw table data and convert this data to relational node rows.
*
* @param <TableRow>> Raw table row type.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

>> -> > . Two times, one below. Maybe single-line.

public interface TableRowIterable<TableRow, Row> extends Iterable<Row> {
/**
* @return Table row iterator.
* */
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

* */ -> */

public Iterator<TableRow> tableRowIterator();

/**
* Enriches {@code nodeRow} with columns from {@code tableRow} *
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

from {@code tableRow} * -> from {@code tableRow}.

/** Participating columns. */
protected final ImmutableBitSet requiredColumns;
/** Row field to column mapping. */
protected final int[] fieldColMapping;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggestion: it looks bit confusing. Let's rename pameters and fields like this everywhere to something like:
rawToRelColMapping and/or relToRawColMapping

* @param nodeRow Relational node row.
* @param fieldColMapping Mapping from node row fields to table row columns. If column is not requried
* corresponding field has -1 mapped value.
* @return Enriched relational node row.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we return a relational row, why the mapping above is from node row to table row. The suggested renaming of fieldColMapping should also help with this.

* @param <TableRow>> Raw table row type.
* @param <Row>> Relational node row type.
*/
public interface TableRowIterable<TableRow, Row> extends Iterable<Row> {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need this new extra interface? Looks like we already have a bunch of scan interfaces and abstract classes. Can it be inside AbstractCacheColumnsScan?

for (int i = 0; i < fieldColMapping.length; i++) {
// j = source field index, i = target field index.
int keyIdx = idxFieldMapping.indexOf(j);
int keyIdx = idxFieldMapping.indexOf(fieldColMapping[i]);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is 'j' now in the comment above?

* @param <TableRow>> Raw table row type.
* @param <Row>> Relational node row type.
*/
public interface TableRowIterable<TableRow, Row> extends Iterable<Row> {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Naming. If we convert, the name might be smth. like TableRawIterableConverter or TableRowFilterableIterable

@Vladsz83
Copy link
Contributor

Vladsz83 commented Jan 9, 2026

@alex-plekhanov , could you please merge master?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants