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

[BUG] [GPU Error Bug] "SELECT ((<string>)LIKE(<column>)) FROM <table>" brings Error #1230

Open
qwebug opened this issue Sep 20, 2023 · 0 comments
Labels
bug Something isn't working needs triage Awaiting triage by a dask-sql maintainer

Comments

@qwebug
Copy link

qwebug commented Sep 20, 2023

What happened:

"SELECT ((<string>)LIKE(<column>)) 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:

import pandas as pd
import dask.dataframe as dd
from dask_sql import Context

c = Context()

df1 = pd.DataFrame({
    'c0': [0.6926717947094722],
    'c1': ['B'],
})
t1 = dd.from_pandas(df1, npartitions=1)

c.create_table('t1', t1, gpu=False)
c.create_table('t1_gpu', t1, gpu=True)

print('CPU Result:')
result1= c.sql("SELECT (('A')LIKE(t1.c1)) FROM t1").compute()
print(result1)

print('GPU Result:')
result2= c.sql("SELECT (('A')LIKE(t1_gpu.c1)) FROM t1_gpu").compute()
print(result2)

Result:

INFO:numba.cuda.cudadrv.driver:init
CPU Result:
   Utf8("A") LIKE t1.c1 
0                  False
GPU Result:
Traceback (most recent call last):
  File "/tmp/bug.py", line 21, in <module>
    result2= c.sql("SELECT (('A')LIKE(t1_gpu.c1)) FROM t1_gpu").compute()
  File "/opt/conda/envs/rapids/lib/python3.10/site-packages/dask_sql/context.py", line 513, in sql
    return self._compute_table_from_rel(rel, return_futures)
  File "/opt/conda/envs/rapids/lib/python3.10/site-packages/dask_sql/context.py", line 839, in _compute_table_from_rel
    dc = RelConverter.convert(rel, context=self)
  File "/opt/conda/envs/rapids/lib/python3.10/site-packages/dask_sql/physical/rel/convert.py", line 61, in convert
    df = plugin_instance.convert(rel, context=context)
  File "/opt/conda/envs/rapids/lib/python3.10/site-packages/dask_sql/physical/rel/logical/project.py", line 57, in convert
    new_columns[random_name] = RexConverter.convert(
  File "/opt/conda/envs/rapids/lib/python3.10/site-packages/dask_sql/physical/rex/convert.py", line 74, in convert
    df = plugin_instance.convert(rel, rex, dc, context=context)
  File "/opt/conda/envs/rapids/lib/python3.10/site-packages/dask_sql/physical/rex/core/call.py", line 1129, in convert
    return operation(*operands, **kwargs)
  File "/opt/conda/envs/rapids/lib/python3.10/site-packages/dask_sql/physical/rex/core/call.py", line 77, in __call__
    return self.f(*operands, **kwargs)
  File "/opt/conda/envs/rapids/lib/python3.10/site-packages/dask_sql/physical/rex/core/call.py", line 402, in regex
    for char in regex:
  File "/opt/conda/envs/rapids/lib/python3.10/site-packages/dask/dataframe/core.py", line 3997, in __iter__
    yield from s
  File "/opt/conda/envs/rapids/lib/python3.10/site-packages/cudf/utils/utils.py", line 288, in __iter__
    raise TypeError(
TypeError: Series object is not iterable. Consider using `.to_arrow()`, `.to_pandas()` or `.values_host` if you wish to iterate over the values.

Anything else we need to know?:

Environment:

@qwebug qwebug added bug Something isn't working needs triage Awaiting triage by a dask-sql maintainer labels Sep 20, 2023
@qwebug qwebug changed the title [BUG] [Error Bug] "SELECT ((<string>)LIKE(<column>)) FROM <table>" brings Error [BUG] [GPU Error Bug] "SELECT ((<string>)LIKE(<column>)) FROM <table>" brings Error Oct 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs triage Awaiting triage by a dask-sql maintainer
Projects
None yet
Development

No branches or pull requests

1 participant