Skip to content
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

New Decimal <--> Floating conversion #15905

Merged
Merged
Changes from 1 commit
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
a38f983
Decimal <--> Floating conversion.
pmattione-nvidia Jun 2, 2024
26ed8fe
Remove xfail from python conversion test
pmattione-nvidia Jun 3, 2024
b77472b
Corrected increment, use CUDF_ENABLE_IF, denormals working
pmattione-nvidia Jun 24, 2024
5b181e0
Merge branch 'branch-24.08' into main_conversion_branch
pmattione-nvidia Jun 24, 2024
720b838
Update comments
pmattione-nvidia Jun 24, 2024
aeff9bc
Merge branch 'main_conversion_branch' of https://github.com/pmattione…
pmattione-nvidia Jun 24, 2024
b9eb32d
Change ++ on trunc to add half-bit on trunc.
pmattione-nvidia Jun 25, 2024
027140f
Fix compile error
pmattione-nvidia Jun 25, 2024
b86af73
Merge branch 'branch-24.08' into main_conversion_branch
pmattione-nvidia Jun 27, 2024
6a47a0a
Fix java tests. Long.MAX_VALUE gets converted to a double of 2^64 on …
pmattione-nvidia Jun 27, 2024
28457b3
Update test comment
pmattione-nvidia Jun 27, 2024
8fceaa9
Merge branch 'main_conversion_branch' of https://github.com/pmattione…
pmattione-nvidia Jun 27, 2024
ac9587d
Fix conversion from java int to long
pmattione-nvidia Jun 27, 2024
ac042d3
Update java/src/test/java/ai/rapids/cudf/ColumnVectorTest.java
pmattione-nvidia Jun 27, 2024
c7441eb
Actually fix conversion from java int to long
pmattione-nvidia Jun 27, 2024
3e4265f
Last python tests pass, matching pandas
pmattione-nvidia Jul 1, 2024
f7a8663
Remove unused python package
pmattione-nvidia Jul 1, 2024
cf531d4
Address comments
pmattione-nvidia Jul 1, 2024
55859d9
Remove last-bit-shift rounding needed to match pyarrow; not desired
pmattione-nvidia Jul 8, 2024
5954b6b
Fix overflow bug
pmattione-nvidia Jul 9, 2024
4d88358
Merge branch 'branch-24.08' into main_conversion_branch
pmattione-nvidia Jul 9, 2024
738f1a5
Split shifting into separate function.
pmattione-nvidia Jul 9, 2024
a5bfaad
Merge branch 'main_conversion_branch' of https://github.com/pmattione…
pmattione-nvidia Jul 9, 2024
0606673
Don't add half bit if converting a whole number!
pmattione-nvidia Jul 10, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 37 additions & 1 deletion java/src/test/java/ai/rapids/cudf/ColumnVectorTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,42 @@

import ai.rapids.cudf.ColumnView.FindOptions;
import ai.rapids.cudf.HostColumnVector.*;
import src.main.java.ai.rapids.cudf.BaseDeviceMemoryBuffer;
import src.main.java.ai.rapids.cudf.BinaryOp;
import src.main.java.ai.rapids.cudf.BufferType;
import src.main.java.ai.rapids.cudf.CaptureGroups;
import src.main.java.ai.rapids.cudf.ColumnVector;
import src.main.java.ai.rapids.cudf.ColumnView;
import src.main.java.ai.rapids.cudf.ContiguousTable;
import src.main.java.ai.rapids.cudf.Cuda;
import src.main.java.ai.rapids.cudf.CudfException;
import src.main.java.ai.rapids.cudf.DType;
import src.main.java.ai.rapids.cudf.DefaultHostMemoryAllocator;
import src.main.java.ai.rapids.cudf.DeviceMemoryBuffer;
import src.main.java.ai.rapids.cudf.GetJsonObjectOptions;
import src.main.java.ai.rapids.cudf.HostColumnVector;
import src.main.java.ai.rapids.cudf.HostColumnVector.BasicType;
import src.main.java.ai.rapids.cudf.HostColumnVector.DataType;
import src.main.java.ai.rapids.cudf.HostColumnVector.ListType;
import src.main.java.ai.rapids.cudf.HostColumnVector.StructData;
import src.main.java.ai.rapids.cudf.HostColumnVector.StructType;
import src.main.java.ai.rapids.cudf.HostColumnVectorCore;
import src.main.java.ai.rapids.cudf.HostMemoryAllocator;
import src.main.java.ai.rapids.cudf.HostMemoryBuffer;
import src.main.java.ai.rapids.cudf.MemoryCleaner;
import src.main.java.ai.rapids.cudf.NullPolicy;
import src.main.java.ai.rapids.cudf.PadSide;
import src.main.java.ai.rapids.cudf.QuantileMethod;
import src.main.java.ai.rapids.cudf.RegexProgram;
import src.main.java.ai.rapids.cudf.ReplacePolicy;
import src.main.java.ai.rapids.cudf.RollingAggregation;
import src.main.java.ai.rapids.cudf.RoundMode;
import src.main.java.ai.rapids.cudf.Scalar;
import src.main.java.ai.rapids.cudf.ScanAggregation;
import src.main.java.ai.rapids.cudf.ScanType;
import src.main.java.ai.rapids.cudf.Table;
import src.main.java.ai.rapids.cudf.WindowOptions;

pmattione-nvidia marked this conversation as resolved.
Show resolved Hide resolved
import com.google.common.collect.Lists;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
Expand Down Expand Up @@ -3511,7 +3547,7 @@ void testCastDoubleToDecimal() {
testCastNumericToDecimalsAndBack(DType.FLOAT64, false, 0,
() -> ColumnVector.fromBoxedDoubles(1.0, 2.1, -3.23, null, 2.41281, (double) Integer.MAX_VALUE),
() -> ColumnVector.fromBoxedDoubles(1.0, 2.0, -3.0, null, 2.0, (double) Integer.MAX_VALUE),
new Long[]{1L, 2L, -3L, null, 2L, Integer.MAX_VALUE}
new Long[]{1L, 2L, -3L, null, 2L, Integer.MAX_VALUE.longValue()}
);
testCastNumericToDecimalsAndBack(DType.FLOAT64, false, -2,
() -> ColumnVector.fromBoxedDoubles(1.0, 2.1, -3.23, null, 2.41281, -55.01999),
Expand Down
Loading