-
Notifications
You must be signed in to change notification settings - Fork 24
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
HPCC4J-562 Odd unsigned decimals incorrect scale #666
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,7 +10,10 @@ childRec := {STRING8 childField1, INTEGER8 childField2, REAL8 childField3}; | |
rec := {INTEGER8 int8, UNSIGNED8 uint8, INTEGER4 int4, UNSIGNED4 uint4, | ||
INTEGER2 int2, UNSIGNED2 uint2, | ||
REAL8 r8, REAL4 r4, | ||
DECIMAL16_8 dec16, UDECIMAL16_8 udec16, | ||
DECIMAL16_8 dec16, | ||
DECIMAL15_8 dec15, | ||
UDECIMAL16_8 udec16, | ||
UDECIMAL15_8 udec15, | ||
QSTRING qStr, | ||
STRING8 fixStr8, | ||
STRING str, | ||
|
@@ -33,7 +36,9 @@ ds := DATASET(totalrecs1, transform(rec, | |
self.r8 := (REAL)(random() % unique_values); | ||
self.r4 := (REAL)(random() % unique_values); | ||
self.dec16 := (REAL)(random() % unique_values); | ||
self.dec15 := (REAL)(random() % unique_values); | ||
self.udec16 := (REAL)(random() % unique_values); | ||
self.udec15 := (REAL)(random() % unique_values); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is there a corresponding test to verify these odd len decimals are correctly read? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @rpastrana Yes, tests in DFSReadWriteTest read those generated datasets, write them back, and then compare the datasets against the generated datasets for correctness. |
||
self.qStr := (STRING)(random() % unique_values); | ||
self.fixStr8 := (STRING)(random() % unique_values); | ||
self.str := (STRING)(random() % unique_values); | ||
|
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.
It's not entirely obvious to me why this logic is needed, perhaps an inline 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.
Good point, added a comment and squashed