Skip to content

[HUDI-6680] - Fixing the info log to fetch column value by name instead of index#9421

Merged
danny0405 merged 1 commit intoapache:masterfrom
lokesh-lingarajan-0310:rowfix
Aug 11, 2023
Merged

[HUDI-6680] - Fixing the info log to fetch column value by name instead of index#9421
danny0405 merged 1 commit intoapache:masterfrom
lokesh-lingarajan-0310:rowfix

Conversation

@lokesh-lingarajan-0310
Copy link
Contributor

@lokesh-lingarajan-0310 lokesh-lingarajan-0310 commented Aug 10, 2023

Change Logs

Fixing the log statement to fetch column value by name instead of index. We found spark sometimes infers the cumulative column as double and hence results in class cast exception.

Impact

low

Risk level (write none, low medium or high below)

low

Contributor's checklist

@lokesh-lingarajan-0310 lokesh-lingarajan-0310 changed the title [9420] - Fixing the info log to fetch column value by name instead of index [HUDI-6680] - Fixing the info log to fetch column value by name instead of index Aug 10, 2023
col(queryInfo.getOrderColumn()).desc(), col(queryInfo.getKeyColumn()).desc()).first();
}
LOG.info("Processed batch size: " + row.getLong(2) + " bytes");
LOG.info("Processed batch size: " + row.get(row.fieldIndex(CUMULATIVE_COLUMN_NAME)) + " bytes");
Copy link
Contributor

Choose a reason for hiding this comment

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

I think the logic is correct before. Just that we should not hard code the column position.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

we hit class cast exception in some cases where spark inferred this field as double

Copy link
Contributor

Choose a reason for hiding this comment

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

Got it

@hudi-bot
Copy link
Collaborator

CI report:

Bot commands @hudi-bot supports the following commands:
  • @hudi-bot run azure re-run the last Azure build

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.

4 participants