-
Notifications
You must be signed in to change notification settings - Fork 304
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
HPCC-30457 ParquetIO.Read() improperly combines hThor and Thor files #17892
Conversation
https://track.hpccsystems.com/browse/HPCC-30457 |
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.
Owned<IDirectoryIterator> itr = createDirectoryIterator(path.str(), filename.append("*.parquet")); | ||
Owned<IDirectoryIterator> fileItr; | ||
|
||
// hThor and Thor files that were written with parquet have diffent naming schemes |
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.
typo: different
{ | ||
// Executing on Thor: Check for single files that were written by hThor or from external source | ||
Owned<IDirectoryIterator> singleItr = createDirectoryIterator(path.str(), filename.append(".parquet")); | ||
if (!singleItr || !singleItr->first()) |
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.
minor: createDirectoryIterator() never returns null, so no need to check.
else | ||
{ | ||
// There was a single file so check for partitioned files | ||
Owned<IDirectoryIterator> multItr = createDirectoryIterator(path.str(), filename.insert(filename.length() - 8, "[0-9]*")); |
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 think this does what you expect. "[0-9]*" is not treated as a regular expression it is a filename wildcard containing '*' or '?'. I think you will need to check for filename* and then post-process. Or use "filename*.parquet"?
// There was a single file so check for partitioned files | ||
Owned<IDirectoryIterator> multItr = createDirectoryIterator(path.str(), filename.insert(filename.length() - 8, "[0-9]*")); | ||
if (!multItr || !multItr->isValid()) | ||
fileItr = singleItr; // If there aren't any partitioned files read the single file with Thor |
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.
why not unconditionally assign multiItr, neither of them contain any values
@ghalliday I am closing this pull request to address this issue in HPCC-30456 as it is closely related. |
Type of change:
Checklist:
Smoketest:
Testing: