Comments (5)
what if we do fixed-point -> float, and we exceed e.g. DBL_MAX. Do we want null here too, or return a double with value infinity?
from cudf.
Creating nulls for overflow is not something we do in general for other operations (e.g. casting float to integer). Usually nulls identify unvalid input rows and are not used to communicate any operation exceptions in this way. Just wanted to point this out. Perhaps an exception is needed for fixed-point.
from cudf.
I agree with that. Yes, nullifying the output rows may not be a generic solution to fix all cases. A more comprehensive solution is probably to return a boolean value after nullifying the output rows indicating whether such replacements have happened.
FYI, in Spark, we either choose to nullify the output rows or throw an exception depending on what the user wants (through a config value).
from cudf.
When we say exception here, do we mean throw a normal C++ exception? Can we do that from kernel code? Do we even want to?
For float -> fixed-point, the conversion could return a std::optional, which is std::nullopt_t if the value overflowed. Upstream code (e.g. the kernel) can then decide what to do with this (Null or exception).
from cudf.
What I do in such cases is nullify the output row, and also set a boolean flag (which will be returned) indicating that such overflow occurred during conversion.
from cudf.
Related Issues (20)
- [FEA] Handle size overflow in nested columns by ORC chunked reader
- [FEA] Better control over the output dtype in aggregations
- For the overload of replace in libcudf where input/target/repl are columns, there isn't a maxrepl arg. HOT 6
- [MNT] add tests for ListMethods? HOT 2
- [BUG] `cudf::round` with `HALF_UP` mode produces non-deterministic output
- [FEA] Add developer/private cudf.pandas API to check for proxy objects HOT 5
- [QST] Unable to install the cuDF in python 3.10 HOT 1
- [BUG] Converting from floating point types to fixed point types does not consider `NaN` and `inf`
- [FEA] Refactoring JSON reader tree algorithms in 24.08 HOT 2
- [BUG] The dtype is changed unexpectly for `cudf.pandas` DataFrame. HOT 6
- [FEA] Replace internal usage of std::string with std::string_view HOT 2
- [DOC] add cudf to database-like ops benchmark? HOT 1
- [QST] Importing cudf in Jupyter notebook gives error HOT 6
- [BUG] Integer overflow errors in JSON reader when total source size exceeds `INT_MAX` bytes
- [FEA] Develop new approach for handling remote I/O HOT 8
- [FEA] Support large strings in `to_pandas`
- [FEA] Support read_fwf functionality in cudf HOT 3
- cudf can't detect my GPU: cudf.numba.cuda.cudadrv.driver.CudaAPIError: [500] Call to cuInit results in CUDA_ERROR_NOT_FOUND HOT 3
- [BUG] The `ndarray` wrapper in `cudf.pandas` doesn't have `__array_interface__`.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cudf.