Skip to content

Conversation

@vrozov
Copy link
Member

@vrozov vrozov commented Nov 7, 2017

No description provided.

@priteshm
Copy link

@amansinha100 can you review this change?

boolean schemaChanged = false;

if (prevBatchWasFull) {
if (!prevBatchNotFull) {

Choose a reason for hiding this comment

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

The double negative makes it somewhat confusing. Perhaps rename the variable to 'prevBatchHasSpace' .

Copy link
Member Author

Choose a reason for hiding this comment

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

@amansinha100 Addressed minor comment, please review delta and I'll squash it.

@amansinha100
Copy link

+1 with a minor comment. In the commit message and JIRA it would be better to say 'code inspection' instead of code review which may be interpreted to mean the normal code review process.

@vrozov vrozov changed the title DRILL-5936: Refactor MergingRecordBatch based on code review DRILL-5936: Refactor MergingRecordBatch based on code inspection Nov 10, 2017
* @param node Reference to the next record to copy from the incoming batches
*/
private boolean copyRecordToOutgoingBatch(final Node node) {
assert outgoingPosition < OUTGOING_BATCH_SIZE

Choose a reason for hiding this comment

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

Doing this assert check on each record would add some overhead. Since the caller already is checking outgoingBatchHasSpace in the while loop, this check is not needed. You could add a javadoc comment that caller is expected to do the validity check.

Copy link
Member Author

Choose a reason for hiding this comment

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

I added the assert to avoid possible errors during further code refactoring. As it is an assert that will not affect performance in production and there is another assert already, I'd prefer to keep it.

Choose a reason for hiding this comment

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

Ok. Updated changes lgtm.

@asfgit asfgit closed this in 36abdd7 Nov 22, 2017
@vrozov vrozov deleted the DRILL-5936 branch November 27, 2017 23:01
KulykRoman pushed a commit to KulykRoman/drill that referenced this pull request Nov 29, 2017
chunhui-shi pushed a commit to chunhui-shi/drill that referenced this pull request Dec 22, 2017
ilooner pushed a commit to ilooner/drill that referenced this pull request Jan 30, 2018
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.

3 participants