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

update #35

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ Fugue for Kaggle users

## Release History

### 0.3.4

* Use Fugue 0.6.5

### 0.3.3

* Use Fugue 0.6.3
Expand Down
13 changes: 11 additions & 2 deletions fuggle/execution_engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,10 @@
register_default_execution_engine,
register_execution_engine,
)
from fugue.constants import FUGUE_CONF_WORKFLOW_CHECKPOINT_PATH
from fugue.constants import (
FUGUE_CONF_SQL_IGNORE_CASE,
FUGUE_CONF_WORKFLOW_CHECKPOINT_PATH,
)
from fugue_dask._constants import FUGUE_DASK_CONF_DATAFRAME_DEFAULT_PARTITIONS
from fugue_dask.execution_engine import DaskExecutionEngine, QPDDaskEngine
from fugue_notebook import NotebookSetup
Expand Down Expand Up @@ -44,7 +47,13 @@ def __init__(self, execution_engine: ExecutionEngine):

def select(self, dfs: DataFrames, statement: str) -> DataFrame:
pd_dfs = {k: self.execution_engine.to_df(v).as_pandas() for k, v in dfs.items()}
df = run_sql_on_pandas(statement, pd_dfs)
df = run_sql_on_pandas(
statement,
pd_dfs,
ignore_case=self.execution_engine.compile_conf.get(
FUGUE_CONF_SQL_IGNORE_CASE, False
),
)
return PandasDataFrame(df)


Expand Down
2 changes: 1 addition & 1 deletion fuggle_version/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.3.3"
__version__ = "0.3.4"
6 changes: 3 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@
keywords="fugue kaggle sql spark dask pandas",
url="http://github.com/fugue-project/fuggle",
install_requires=[
"fugue[spark,dask,sql]==0.6.3",
"tune[all]==0.0.9.dev1",
"fugue[spark,dask,sql,duckdb]==0.6.5",
"tune[all]==0.0.9",
"notebook",
"kaggle",
"seaborn",
"qpd",
"dask[dataframe]",
"dask[dataframe,distributed]",
"pandavro",
"psutil",
],
Expand Down
14 changes: 6 additions & 8 deletions tests/test_execution_engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ def make_engine(self):
)
return e

def dag(self) -> FugueSQLWorkflow:
return FugueSQLWorkflow(self.engine)
def dag(self, conf=None) -> FugueSQLWorkflow:
return FugueSQLWorkflow(self.engine, conf)

def test_sqlite(self):
with self.dag() as dag:
Expand Down Expand Up @@ -65,8 +65,6 @@ def test__join_outer_pandas_incompatible(self):
def test_sample_n(self):
pass




class KaggleSparkExecutionEngineBuiltInTests(BuiltInTests.Tests):
@pytest.fixture(autouse=True)
Expand All @@ -82,8 +80,8 @@ def make_engine(self):
)
return e

def dag(self) -> FugueSQLWorkflow:
return FugueSQLWorkflow(self.engine)
def dag(self, conf=None) -> FugueSQLWorkflow:
return FugueSQLWorkflow(self.engine, conf)

def test_callback(self):
pass
Expand Down Expand Up @@ -132,8 +130,8 @@ def make_engine(self):
)
return e

def dag(self) -> FugueSQLWorkflow:
return FugueSQLWorkflow(self.engine)
def dag(self, conf=None) -> FugueSQLWorkflow:
return FugueSQLWorkflow(self.engine, conf)

def test_sqlite(self):
with self.dag() as dag:
Expand Down