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 Logic Bug] "SELECT (CASE (<column>) WHEN <number> THEN <number> END) FROM <table>" brings Error #1236

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 (CASE (<column>) WHEN <number> THEN <number> END) FROM <table>" brings different results, when using CPU and GPU.

What you expected to happen:

It is the same result, when using CPU and GPU.

Minimal Complete Verifiable Example:

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

c = Context()

df0 = pd.DataFrame({
    'c0': [0.898116830962538],
})
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 (CASE (t0.c0) WHEN 1 THEN 1 END) FROM t0").compute()
print(result1)

print('GPU Result:')
result2= c.sql("SELECT (CASE (t0_gpu.c0) WHEN 1 THEN 1 END) FROM t0_gpu").compute()
print(result2)

Result:

INFO:numba.cuda.cudadrv.driver:init
CPU Result:
   CASE t0.c0 WHEN Int64(1) THEN Int64(1) END
0                                         NaN
GPU Result:
  CASE t0_gpu.c0 WHEN Int64(1) THEN Int64(1) END
0                                           <NA>
INFO:numba.cuda.cudadrv.driver:add pending dealloc: module_unload ? bytes

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][Logic Bug] "SELECT (CASE (<column>) WHEN <number> THEN <number> END) FROM <table>" brings Error [BUG][GPU Logic Bug] "SELECT (CASE (<column>) WHEN <number> THEN <number> END) FROM <table>" brings Error Jan 22, 2024
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