-
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-30524 Parquet Strings cannot be converted to REAL #17909
Conversation
https://track.hpccsystems.com/browse/HPCC-30524 |
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.
Looks good to me, but either Gavin or Jake should sign off as well. I've added them as reviewers.
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.
@jackdelv - 2 minor comments, but could be merged now afaics.
plugins/parquet/parquetembed.cpp
Outdated
@@ -956,12 +956,42 @@ __int64 ParquetRowBuilder::getCurrIntValue(const RtlFieldInfo *field) | |||
{ | |||
__int64 myint64 = 0; | |||
auto scalar = getCurrView(field); | |||
handleDeserializeOutcome(tokenDeserializer.deserialize(scalar.data(), myint64), "signed", scalar.data()); | |||
handleDeserializeOutcome(tokenDeserializer.deserialize(StringBuffer(scalar.size(), scalar.data()).str(), myint64), "signed", scalar.data()); |
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.
style: we don't normally use inline temporary constructors like this, it tends to make the code less clear. It would be clearer to declare on a proceeding line.
Also, given the scalar is a std::string_view using a std::string vs a StringBuffer would seem more in keeping.
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.
Removed inline constructor and changed container to std::string.
plugins/parquet/parquetembed.cpp
Outdated
{ | ||
double mydouble = 0.0; | ||
auto scalar = getCurrView(field); | ||
handleDeserializeOutcome(tokenDeserializer.deserialize(StringBuffer(scalar.size(), scalar.data()).str(), mydouble), "real", scalar.data()); |
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: as per prev. comment - consider declaring temp string container on previous line and using std::string.
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.
Changed.
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.
@jackdelv please squash the commits
@ghalliday squashed |
2293360
into
hpcc-systems:candidate-9.4.x
Type of change:
Checklist:
Smoketest:
Testing: