Skip to content

[BUG] [GPU Logic Bug] SELECT (<number>) NOT IN (CASE <column> WHEN <number> THEN <number> END) FROM <table> brings Error #1341

Description

@qwebug

What happened:

SELECT (<number>) NOT IN (CASE <column> WHEN <number> THEN <number> END) FROM <table> brings different results, when using CPU and GPU execution.

What you expected to happen:

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

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.1],
})
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 (0.1) NOT IN (CASE t0.c0 WHEN 1 THEN 2 END) FROM t0").compute()
print(result1)

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

Result:

INFO:numba.cuda.cudadrv.driver:init
CPU Result:
   Float64(0.1) NOT IN (Map { iter: Iter([CASE t0.c0 WHEN Int64(1) THEN Int64(2) END]) })
0                                               True                                     
GPU Result:
  Float64(0.1) NOT IN (Map { iter: Iter([CASE t0_gpu.c0 WHEN Int64(1) THEN Int64(2) END]) })
0                                               <NA>                                        
INFO:numba.cuda.cudadrv.driver:add pending dealloc: module_unload ? bytes

Anything else we need to know?:

Environment:

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingneeds triageAwaiting triage by a dask-sql maintainer

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions