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
importfugue_sqldag=fugue_sql.FugueSQLWorkflow()
df=dag.df([[0, "hello"], [1, "world"]], "a:int64,b:str")
dag("SELECT * FROM df WHERE a > 0 YIELD DATAFRAME AS result")
result=dag.run("dask")
Describe the bug
When pulling in triad>=0.9.2, the above reproducer fails due to a missing enforce_type attribute:
AttributeError Traceback (most recent call last)
Cell In [1], line 7
4 df = dag.df([[0, "hello"], [1, "world"]], "a:int64,b:str")
5 dag("SELECT * FROM df WHERE a > 0 YIELD DATAFRAME AS result")
----> 7 result = dag.run("dask")
File /datasets/charlesb/miniforge3/envs/dask-sql-py38/lib/python3.8/site-packages/fugue/workflow/workflow.py:1523, in FugueWorkflow.run(self, *args, **kwargs)
1521 if ctb is None: # pragma: no cover
1522 raise
-> 1523 raise ex.with_traceback(ctb)
1524 self._computed = True
1525 return DataFrames(
1526 {
1527 k: v.result
(...)
1530 }
1531 )
Cell In [1], line 4
1import fugue_sql
3 dag = fugue_sql.FugueSQLWorkflow()
----> 4 df = dag.df([[0, "hello"], [1, "world"]], "a:int64,b:str")
5 dag("SELECT * FROM df WHERE a > 0 YIELD DATAFRAME AS result")
7 result = dag.run("dask")
File /datasets/charlesb/miniforge3/envs/dask-sql-py38/lib/python3.8/site-packages/fugue/dataframe/pandas_dataframe.py:64, in PandasDataFrame.__init__(self, df, schema, metadata, pandas_df_wrapper)
62 schema = _input_schema(schema).assert_not_empty()
63 pdf = pd.DataFrame(df, columns=schema.names)
---> 64 pdf = PD_UTILS.enforce_type(pdf, schema.pa_schema, null_safe=True)
65ifPD_UTILS.empty(pdf):
66for k, v in schema.items():
AttributeError: 'PandasUtils' object has no attribute 'enforce_type'
Expected behavior
With triad=0.9.1, running the above workflow would succeed.
Environment (please complete the following information):
Backend: dask
Backend version: 2022.3.0
Python version: 3.8
OS: ubuntu 20.04
The text was updated successfully, but these errors were encountered:
charlesbluca
changed the title
[BUG]
[BUG] AttributeError in PandasDataFrame.__init__ with triad>=0.9.2Nov 13, 2023
Ah, sorry, but I think Fugue side has finished the change to depend on dask-sql when the backend is dask, I will make a pr to dask-sql to remove the unnecessary part.
This would ensure sub-dependencies are only updated with a specific version update on fugue.
Add a disclaimer in the installation steps that proper requirement locking is required from end-users, by using something like pipenv. Currently documentation recommends installation by pip which is a ticking bomb: https://github.com/fugue-project/fugue#installation
Minimal Code To Reproduce
Describe the bug
When pulling in
triad>=0.9.2
, the above reproducer fails due to a missingenforce_type
attribute:Expected behavior
With
triad=0.9.1
, running the above workflow would succeed.Environment (please complete the following information):
The text was updated successfully, but these errors were encountered: