You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"SELECT (('b햦]D7Jr31')||((CASE 'Kx}lzJ^' WHEN <column> THEN '' END ))) FROM <table> " brings error, when using GPU.
However it is able to output result, when using CPU.
What you expected to happen:
It will not bring error, when using GPU.
Minimal Complete Verifiable Example:
importpandasaspdimportdask.dataframeasddfromdask_sqlimportContextc=Context()
df0=pd.DataFrame({
'c0': ['e'],
'c1': ['o'],
})
t0=dd.from_pandas(df0, npartitions=1)
c.create_table('t0', t0, gpu=False)
c.create_table('t0_gpu', t0, gpu=True)
print('CPU Result:')
result1=c.sql("SELECT (('b햦]D7Jr31')||((CASE 'Kx}lzJ^' WHEN t0.c1 THEN '' END ))) FROM t0").compute()
print(result1)
print('GPU Result:')
result2=c.sql("SELECT (('b햦]D7Jr31')||((CASE 'Kx}lzJ^' WHEN t0_gpu.c1 THEN '' END ))) FROM t0_gpu").compute()
print(result2)
Result:
INFO:numba.cuda.cudadrv.driver:init
CPU Result:
Utf8("b햦]D7Jr31") || CASE Utf8("Kx}lzJ^") WHEN t0.c1 THEN Utf8("") END
0 NaN
GPU Result:
Traceback (most recent call last):
File "/opt/conda/envs/rapids/lib/python3.10/site-packages/cudf/core/indexed_frame.py", line 2180, in _apply
kernel, retty = _compile_or_get(
File "/opt/conda/envs/rapids/lib/python3.10/site-packages/nvtx/nvtx.py", line 101, in inner
result = func(*args, **kwargs)
File "/opt/conda/envs/rapids/lib/python3.10/site-packages/cudf/core/udf/utils.py", line 268, in _compile_or_get
kernel, scalar_return_type = kernel_getter(frame, func, args)
File "/opt/conda/envs/rapids/lib/python3.10/site-packages/cudf/core/udf/scalar_function.py", line 55, in _get_scalar_kernel
scalar_return_type = _get_udf_return_type(sr_type, func, args)
File "/opt/conda/envs/rapids/lib/python3.10/site-packages/nvtx/nvtx.py", line 101, in inner
result = func(*args, **kwargs)
File "/opt/conda/envs/rapids/lib/python3.10/site-packages/cudf/core/udf/utils.py", line 88, in _get_udf_return_type
ptx, output_type = cudautils.compile_udf(func, compile_sig)
File "/opt/conda/envs/rapids/lib/python3.10/site-packages/cudf/utils/cudautils.py", line 258, in compile_udf
output_type = numpy_support.as_dtype(return_type).type
File "/opt/conda/envs/rapids/lib/python3.10/site-packages/numba/np/numpy_support.py", line 159, in as_dtype
raise errors.NumbaNotImplementedError(msg)
numba.core.errors.NumbaNotImplementedError: unicode_type cannot be represented as a NumPy dtype
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/tmp/bug17/bug17.py", line 20, in<module>
result2= c.sql("SELECT (('b햦]D7Jr31')||((CASE 'Kx}lzJ^' WHEN t0_gpu.c1 THEN '' END ))) FROM t0_gpu").compute()
File "/opt/conda/envs/rapids/lib/python3.10/site-packages/dask/base.py", line 314, in compute
(result,) = compute(self, traverse=False, **kwargs)
File "/opt/conda/envs/rapids/lib/python3.10/site-packages/dask/base.py", line 599, in compute
results = schedule(dsk, keys, **kwargs)
File "/opt/conda/envs/rapids/lib/python3.10/site-packages/dask/threaded.py", line 89, in get
results = get_async(
File "/opt/conda/envs/rapids/lib/python3.10/site-packages/dask/local.py", line 511, in get_async
raise_exception(exc, tb)
File "/opt/conda/envs/rapids/lib/python3.10/site-packages/dask/local.py", line 319, in reraise
raise exc
File "/opt/conda/envs/rapids/lib/python3.10/site-packages/dask/local.py", line 224, in execute_task
result = _execute_task(task, data)
File "/opt/conda/envs/rapids/lib/python3.10/site-packages/dask/core.py", line 119, in _execute_task
return func(*(_execute_task(a, cache) forain args))
File "/opt/conda/envs/rapids/lib/python3.10/site-packages/dask/optimization.py", line 990, in __call__
return core.get(self.dsk, self.outkey, dict(zip(self.inkeys, args)))
File "/opt/conda/envs/rapids/lib/python3.10/site-packages/dask/core.py", line 149, in get
result = _execute_task(task, cache)
File "/opt/conda/envs/rapids/lib/python3.10/site-packages/dask/core.py", line 119, in _execute_task
return func(*(_execute_task(a, cache) forain args))
File "/opt/conda/envs/rapids/lib/python3.10/site-packages/dask/core.py", line 119, in<genexpr>return func(*(_execute_task(a, cache) forain args))
File "/opt/conda/envs/rapids/lib/python3.10/site-packages/dask/core.py", line 119, in _execute_task
return func(*(_execute_task(a, cache) forain args))
File "/opt/conda/envs/rapids/lib/python3.10/site-packages/dask/core.py", line 119, in<genexpr>return func(*(_execute_task(a, cache) forain args))
File "/opt/conda/envs/rapids/lib/python3.10/site-packages/dask/core.py", line 119, in _execute_task
return func(*(_execute_task(a, cache) forain args))
File "/opt/conda/envs/rapids/lib/python3.10/site-packages/dask/utils.py", line 73, in apply
return func(*args, **kwargs)
File "/opt/conda/envs/rapids/lib/python3.10/site-packages/dask/dataframe/core.py", line 7006, in apply_and_enforce
df = func(*args, **kwargs)
File "/opt/conda/envs/rapids/lib/python3.10/site-packages/dask/utils.py", line 1105, in __call__
return getattr(__obj, self.method)(*args, **kwargs)
File "/opt/conda/envs/rapids/lib/python3.10/site-packages/nvtx/nvtx.py", line 101, in inner
result = func(*args, **kwargs)
File "/opt/conda/envs/rapids/lib/python3.10/site-packages/cudf/core/series.py", line 2473, in apply
result = self._apply(func, _get_scalar_kernel, *args, **kwargs)
File "/opt/conda/envs/rapids/lib/python3.10/contextlib.py", line 79, in inner
return func(*args, **kwds)
File "/opt/conda/envs/rapids/lib/python3.10/site-packages/nvtx/nvtx.py", line 101, in inner
result = func(*args, **kwargs)
File "/opt/conda/envs/rapids/lib/python3.10/site-packages/cudf/core/indexed_frame.py", line 2184, in _apply
raise ValueError(
ValueError: user defined functioncompilation failed.
What happened:
"SELECT (('b햦]D7Jr31')||((CASE 'Kx}lzJ^' WHEN <column> THEN '' END ))) FROM <table> " brings error, when using GPU.
However it is able to output result, when using CPU.
What you expected to happen:
It will not bring error, when using GPU.
Minimal Complete Verifiable Example:
Result:
Anything else we need to know?:
Environment:
The text was updated successfully, but these errors were encountered: