-
Notifications
You must be signed in to change notification settings - Fork 3k
Core: Minor refactoring of PartitionsTable #6975
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
jackye1995
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Apart from the column order, I am good with the refactoring based on what we want to add next. Wondering what others think.
| Types.NestedField.required(2, "record_count", Types.LongType.get()), | ||
| Types.NestedField.required(3, "file_count", Types.IntegerType.get()), | ||
| Types.NestedField.required(4, "spec_id", Types.IntegerType.get())); | ||
| Types.NestedField.required(4, "spec_id", Types.IntegerType.get()), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not sure about the column order, it feels odd to me to have IDs in 1,4,2,3 order. But that's just personal preference.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we have discussed this here
#6661 (comment)
I think @RussellSpitzer and @szehon-ho agree that there is no impact from column re-ordering.
Spec-id in the middle really looks odd when we add other counters. I don't want to change the field id and break the compatibility.
| Types.NestedField.required( | ||
| 2, "record_count", Types.LongType.get(), "count of records in data files"), | ||
| Types.NestedField.required( | ||
| 3, "file_count", Types.IntegerType.get(), "count of data files")); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The docs should use sentence case.
| Table partitionsTable = new PartitionsTable(table); | ||
| Types.StructType expected = | ||
| new Schema(required(3, "file_count", Types.IntegerType.get())).asStruct(); | ||
| new Schema(required(3, "file_count", Types.IntegerType.get(), "count of data files")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Docs should use sentence case here as well.
| scan.schema(), | ||
| partitions, | ||
| root -> StaticDataTask.Row.of(root.recordCount, root.fileCount)); | ||
| root -> StaticDataTask.Row.of(root.dataRecordCount, root.dataFileCount)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see much value in these renames, but it's okay with me.
|
@rdblue: Thanks for the review. I have fixed the case now. |
|
Hi, Can this PR be merged if no more comments or no new reviewers? |
|
Sorry overlooked this PR, looks like all comments are addressed, I will go ahead to merge it. |
Changes:
record_countandfile_countto clarify that it is only data file counters.recordCounttodataRecordCountandfileCounttodataFileCountfor better clarity.This PR is a prerequisite for #6661