-
Notifications
You must be signed in to change notification settings - Fork 304
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #19131 from jackdelv/HPCC-32687
HPCC-32687 Output large Decimals correctly Reviewed-By: Dan S. Camper <[email protected]> Reviewed-by: Gavin Halliday <[email protected]> Merged-by: Gavin Halliday <[email protected]>
- Loading branch information
Showing
6 changed files
with
67 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
/*############################################################################## | ||
HPCC SYSTEMS software Copyright (C) 2024 HPCC Systems®. | ||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
############################################################################## */ | ||
|
||
// Decimals with less than 50 digits are output correctly | ||
x := (DECIMAL48_32) '1234567890123456.12345678901234567890123456789012'; | ||
y := (DECIMAL48_16) '12345678901234567890123456789012.1234567890123456'; | ||
// For digits >= 50, the output was 50 '*' rather than the actual value | ||
i := (DECIMAL49_32) '12345678901234567.12345678901234567890123456789012'; | ||
j := (DECIMAL50_32) '123456789012345678.12345678901234567890123456789012'; | ||
OUTPUT(x); | ||
OUTPUT(y); | ||
OUTPUT(i); | ||
OUTPUT(j); | ||
|
||
a := (DECIMAL64_32) '12345678901234567890123456789012.12345678901234567890123456789012'; | ||
// Max length Decimal with 64 digits and a negative sign | ||
b := (DECIMAL64_32) '-12345678901234567890123456789011.12345678901234567890123456789012'; | ||
OUTPUT(a); | ||
OUTPUT(b); | ||
OUTPUT(a + b); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<Dataset name='Result 1'> | ||
<Row><Result_1>1234567890123456.12345678901234567890123456789012</Result_1></Row> | ||
</Dataset> | ||
<Dataset name='Result 2'> | ||
<Row><Result_2>12345678901234567890123456789012.1234567890123456</Result_2></Row> | ||
</Dataset> | ||
<Dataset name='Result 3'> | ||
<Row><Result_3>12345678901234567.12345678901234567890123456789012</Result_3></Row> | ||
</Dataset> | ||
<Dataset name='Result 4'> | ||
<Row><Result_4>123456789012345678.12345678901234567890123456789012</Result_4></Row> | ||
</Dataset> | ||
<Dataset name='Result 5'> | ||
<Row><Result_5>12345678901234567890123456789012.12345678901234567890123456789012</Result_5></Row> | ||
</Dataset> | ||
<Dataset name='Result 6'> | ||
<Row><Result_6>-12345678901234567890123456789011.12345678901234567890123456789012</Result_6></Row> | ||
</Dataset> | ||
<Dataset name='Result 7'> | ||
<Row><Result_7>1</Result_7></Row> | ||
</Dataset> |