sqlframe 1.6.0__tar.gz → 1.6.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {sqlframe-1.6.0 → sqlframe-1.6.2}/PKG-INFO +1 -1
- {sqlframe-1.6.0 → sqlframe-1.6.2}/setup.py +1 -1
- {sqlframe-1.6.0 → sqlframe-1.6.2}/sqlframe/_version.py +2 -2
- {sqlframe-1.6.0 → sqlframe-1.6.2}/sqlframe/base/column.py +4 -0
- {sqlframe-1.6.0 → sqlframe-1.6.2}/sqlframe/base/dataframe.py +19 -4
- {sqlframe-1.6.0 → sqlframe-1.6.2}/sqlframe.egg-info/PKG-INFO +1 -1
- {sqlframe-1.6.0 → sqlframe-1.6.2}/sqlframe.egg-info/requires.txt +1 -1
- {sqlframe-1.6.0 → sqlframe-1.6.2}/tests/integration/test_int_dataframe.py +47 -2
- {sqlframe-1.6.0 → sqlframe-1.6.2}/.github/CODEOWNERS +0 -0
- {sqlframe-1.6.0 → sqlframe-1.6.2}/.github/workflows/main.workflow.yaml +0 -0
- {sqlframe-1.6.0 → sqlframe-1.6.2}/.github/workflows/publish.workflow.yaml +0 -0
- {sqlframe-1.6.0 → sqlframe-1.6.2}/.gitignore +0 -0
- {sqlframe-1.6.0 → sqlframe-1.6.2}/.pre-commit-config.yaml +0 -0
- {sqlframe-1.6.0 → sqlframe-1.6.2}/.readthedocs.yaml +0 -0
- {sqlframe-1.6.0 → sqlframe-1.6.2}/LICENSE +0 -0
- {sqlframe-1.6.0 → sqlframe-1.6.2}/Makefile +0 -0
- {sqlframe-1.6.0 → sqlframe-1.6.2}/README.md +0 -0
- {sqlframe-1.6.0 → sqlframe-1.6.2}/blogs/images/but_wait_theres_more.gif +0 -0
- {sqlframe-1.6.0 → sqlframe-1.6.2}/blogs/images/cake.gif +0 -0
- {sqlframe-1.6.0 → sqlframe-1.6.2}/blogs/images/you_get_pyspark_api.gif +0 -0
- {sqlframe-1.6.0 → sqlframe-1.6.2}/blogs/sqlframe_universal_dataframe_api.md +0 -0
- {sqlframe-1.6.0 → sqlframe-1.6.2}/docs/bigquery.md +0 -0
- {sqlframe-1.6.0 → sqlframe-1.6.2}/docs/configuration.md +0 -0
- {sqlframe-1.6.0 → sqlframe-1.6.2}/docs/docs/bigquery.md +0 -0
- {sqlframe-1.6.0 → sqlframe-1.6.2}/docs/docs/duckdb.md +0 -0
- {sqlframe-1.6.0 → sqlframe-1.6.2}/docs/docs/images/SF.png +0 -0
- {sqlframe-1.6.0 → sqlframe-1.6.2}/docs/docs/images/favicon.png +0 -0
- {sqlframe-1.6.0 → sqlframe-1.6.2}/docs/docs/images/favicon_old.png +0 -0
- {sqlframe-1.6.0 → sqlframe-1.6.2}/docs/docs/images/sqlframe_diagram.png +0 -0
- {sqlframe-1.6.0 → sqlframe-1.6.2}/docs/docs/images/sqlframe_logo.png +0 -0
- {sqlframe-1.6.0 → sqlframe-1.6.2}/docs/docs/postgres.md +0 -0
- {sqlframe-1.6.0 → sqlframe-1.6.2}/docs/duckdb.md +0 -0
- {sqlframe-1.6.0 → sqlframe-1.6.2}/docs/images/SF.png +0 -0
- {sqlframe-1.6.0 → sqlframe-1.6.2}/docs/images/favicon.png +0 -0
- {sqlframe-1.6.0 → sqlframe-1.6.2}/docs/images/favicon_old.png +0 -0
- {sqlframe-1.6.0 → sqlframe-1.6.2}/docs/images/sqlframe_diagram.png +0 -0
- {sqlframe-1.6.0 → sqlframe-1.6.2}/docs/images/sqlframe_logo.png +0 -0
- {sqlframe-1.6.0 → sqlframe-1.6.2}/docs/index.md +0 -0
- {sqlframe-1.6.0 → sqlframe-1.6.2}/docs/postgres.md +0 -0
- {sqlframe-1.6.0 → sqlframe-1.6.2}/docs/requirements.txt +0 -0
- {sqlframe-1.6.0 → sqlframe-1.6.2}/docs/snowflake.md +0 -0
- {sqlframe-1.6.0 → sqlframe-1.6.2}/docs/standalone.md +0 -0
- {sqlframe-1.6.0 → sqlframe-1.6.2}/docs/stylesheets/extra.css +0 -0
- {sqlframe-1.6.0 → sqlframe-1.6.2}/mkdocs.yml +0 -0
- {sqlframe-1.6.0 → sqlframe-1.6.2}/pytest.ini +0 -0
- {sqlframe-1.6.0 → sqlframe-1.6.2}/renovate.json +0 -0
- {sqlframe-1.6.0 → sqlframe-1.6.2}/setup.cfg +0 -0
- {sqlframe-1.6.0 → sqlframe-1.6.2}/sqlframe/LICENSE +0 -0
- {sqlframe-1.6.0 → sqlframe-1.6.2}/sqlframe/__init__.py +0 -0
- {sqlframe-1.6.0 → sqlframe-1.6.2}/sqlframe/base/__init__.py +0 -0
- {sqlframe-1.6.0 → sqlframe-1.6.2}/sqlframe/base/_typing.py +0 -0
- {sqlframe-1.6.0 → sqlframe-1.6.2}/sqlframe/base/catalog.py +0 -0
- {sqlframe-1.6.0 → sqlframe-1.6.2}/sqlframe/base/decorators.py +0 -0
- {sqlframe-1.6.0 → sqlframe-1.6.2}/sqlframe/base/exceptions.py +0 -0
- {sqlframe-1.6.0 → sqlframe-1.6.2}/sqlframe/base/function_alternatives.py +0 -0
- {sqlframe-1.6.0 → sqlframe-1.6.2}/sqlframe/base/functions.py +0 -0
- {sqlframe-1.6.0 → sqlframe-1.6.2}/sqlframe/base/group.py +0 -0
- {sqlframe-1.6.0 → sqlframe-1.6.2}/sqlframe/base/mixins/__init__.py +0 -0
- {sqlframe-1.6.0 → sqlframe-1.6.2}/sqlframe/base/mixins/catalog_mixins.py +0 -0
- {sqlframe-1.6.0 → sqlframe-1.6.2}/sqlframe/base/mixins/dataframe_mixins.py +0 -0
- {sqlframe-1.6.0 → sqlframe-1.6.2}/sqlframe/base/mixins/readwriter_mixins.py +0 -0
- {sqlframe-1.6.0 → sqlframe-1.6.2}/sqlframe/base/normalize.py +0 -0
- {sqlframe-1.6.0 → sqlframe-1.6.2}/sqlframe/base/operations.py +0 -0
- {sqlframe-1.6.0 → sqlframe-1.6.2}/sqlframe/base/readerwriter.py +0 -0
- {sqlframe-1.6.0 → sqlframe-1.6.2}/sqlframe/base/session.py +0 -0
- {sqlframe-1.6.0 → sqlframe-1.6.2}/sqlframe/base/transforms.py +0 -0
- {sqlframe-1.6.0 → sqlframe-1.6.2}/sqlframe/base/types.py +0 -0
- {sqlframe-1.6.0 → sqlframe-1.6.2}/sqlframe/base/util.py +0 -0
- {sqlframe-1.6.0 → sqlframe-1.6.2}/sqlframe/base/window.py +0 -0
- {sqlframe-1.6.0 → sqlframe-1.6.2}/sqlframe/bigquery/__init__.py +0 -0
- {sqlframe-1.6.0 → sqlframe-1.6.2}/sqlframe/bigquery/catalog.py +0 -0
- {sqlframe-1.6.0 → sqlframe-1.6.2}/sqlframe/bigquery/column.py +0 -0
- {sqlframe-1.6.0 → sqlframe-1.6.2}/sqlframe/bigquery/dataframe.py +0 -0
- {sqlframe-1.6.0 → sqlframe-1.6.2}/sqlframe/bigquery/functions.py +0 -0
- {sqlframe-1.6.0 → sqlframe-1.6.2}/sqlframe/bigquery/functions.pyi +0 -0
- {sqlframe-1.6.0 → sqlframe-1.6.2}/sqlframe/bigquery/group.py +0 -0
- {sqlframe-1.6.0 → sqlframe-1.6.2}/sqlframe/bigquery/readwriter.py +0 -0
- {sqlframe-1.6.0 → sqlframe-1.6.2}/sqlframe/bigquery/session.py +0 -0
- {sqlframe-1.6.0 → sqlframe-1.6.2}/sqlframe/bigquery/types.py +0 -0
- {sqlframe-1.6.0 → sqlframe-1.6.2}/sqlframe/bigquery/window.py +0 -0
- {sqlframe-1.6.0 → sqlframe-1.6.2}/sqlframe/duckdb/__init__.py +0 -0
- {sqlframe-1.6.0 → sqlframe-1.6.2}/sqlframe/duckdb/catalog.py +0 -0
- {sqlframe-1.6.0 → sqlframe-1.6.2}/sqlframe/duckdb/column.py +0 -0
- {sqlframe-1.6.0 → sqlframe-1.6.2}/sqlframe/duckdb/dataframe.py +0 -0
- {sqlframe-1.6.0 → sqlframe-1.6.2}/sqlframe/duckdb/functions.py +0 -0
- {sqlframe-1.6.0 → sqlframe-1.6.2}/sqlframe/duckdb/functions.pyi +0 -0
- {sqlframe-1.6.0 → sqlframe-1.6.2}/sqlframe/duckdb/group.py +0 -0
- {sqlframe-1.6.0 → sqlframe-1.6.2}/sqlframe/duckdb/readwriter.py +0 -0
- {sqlframe-1.6.0 → sqlframe-1.6.2}/sqlframe/duckdb/session.py +0 -0
- {sqlframe-1.6.0 → sqlframe-1.6.2}/sqlframe/duckdb/types.py +0 -0
- {sqlframe-1.6.0 → sqlframe-1.6.2}/sqlframe/duckdb/window.py +0 -0
- {sqlframe-1.6.0 → sqlframe-1.6.2}/sqlframe/postgres/__init__.py +0 -0
- {sqlframe-1.6.0 → sqlframe-1.6.2}/sqlframe/postgres/catalog.py +0 -0
- {sqlframe-1.6.0 → sqlframe-1.6.2}/sqlframe/postgres/column.py +0 -0
- {sqlframe-1.6.0 → sqlframe-1.6.2}/sqlframe/postgres/dataframe.py +0 -0
- {sqlframe-1.6.0 → sqlframe-1.6.2}/sqlframe/postgres/functions.py +0 -0
- {sqlframe-1.6.0 → sqlframe-1.6.2}/sqlframe/postgres/functions.pyi +0 -0
- {sqlframe-1.6.0 → sqlframe-1.6.2}/sqlframe/postgres/group.py +0 -0
- {sqlframe-1.6.0 → sqlframe-1.6.2}/sqlframe/postgres/readwriter.py +0 -0
- {sqlframe-1.6.0 → sqlframe-1.6.2}/sqlframe/postgres/session.py +0 -0
- {sqlframe-1.6.0 → sqlframe-1.6.2}/sqlframe/postgres/types.py +0 -0
- {sqlframe-1.6.0 → sqlframe-1.6.2}/sqlframe/postgres/window.py +0 -0
- {sqlframe-1.6.0 → sqlframe-1.6.2}/sqlframe/redshift/__init__.py +0 -0
- {sqlframe-1.6.0 → sqlframe-1.6.2}/sqlframe/redshift/catalog.py +0 -0
- {sqlframe-1.6.0 → sqlframe-1.6.2}/sqlframe/redshift/column.py +0 -0
- {sqlframe-1.6.0 → sqlframe-1.6.2}/sqlframe/redshift/dataframe.py +0 -0
- {sqlframe-1.6.0 → sqlframe-1.6.2}/sqlframe/redshift/functions.py +0 -0
- {sqlframe-1.6.0 → sqlframe-1.6.2}/sqlframe/redshift/group.py +0 -0
- {sqlframe-1.6.0 → sqlframe-1.6.2}/sqlframe/redshift/readwriter.py +0 -0
- {sqlframe-1.6.0 → sqlframe-1.6.2}/sqlframe/redshift/session.py +0 -0
- {sqlframe-1.6.0 → sqlframe-1.6.2}/sqlframe/redshift/types.py +0 -0
- {sqlframe-1.6.0 → sqlframe-1.6.2}/sqlframe/redshift/window.py +0 -0
- {sqlframe-1.6.0 → sqlframe-1.6.2}/sqlframe/snowflake/__init__.py +0 -0
- {sqlframe-1.6.0 → sqlframe-1.6.2}/sqlframe/snowflake/catalog.py +0 -0
- {sqlframe-1.6.0 → sqlframe-1.6.2}/sqlframe/snowflake/column.py +0 -0
- {sqlframe-1.6.0 → sqlframe-1.6.2}/sqlframe/snowflake/dataframe.py +0 -0
- {sqlframe-1.6.0 → sqlframe-1.6.2}/sqlframe/snowflake/functions.py +0 -0
- {sqlframe-1.6.0 → sqlframe-1.6.2}/sqlframe/snowflake/functions.pyi +0 -0
- {sqlframe-1.6.0 → sqlframe-1.6.2}/sqlframe/snowflake/group.py +0 -0
- {sqlframe-1.6.0 → sqlframe-1.6.2}/sqlframe/snowflake/readwriter.py +0 -0
- {sqlframe-1.6.0 → sqlframe-1.6.2}/sqlframe/snowflake/session.py +0 -0
- {sqlframe-1.6.0 → sqlframe-1.6.2}/sqlframe/snowflake/types.py +0 -0
- {sqlframe-1.6.0 → sqlframe-1.6.2}/sqlframe/snowflake/window.py +0 -0
- {sqlframe-1.6.0 → sqlframe-1.6.2}/sqlframe/spark/__init__.py +0 -0
- {sqlframe-1.6.0 → sqlframe-1.6.2}/sqlframe/spark/catalog.py +0 -0
- {sqlframe-1.6.0 → sqlframe-1.6.2}/sqlframe/spark/column.py +0 -0
- {sqlframe-1.6.0 → sqlframe-1.6.2}/sqlframe/spark/dataframe.py +0 -0
- {sqlframe-1.6.0 → sqlframe-1.6.2}/sqlframe/spark/functions.py +0 -0
- {sqlframe-1.6.0 → sqlframe-1.6.2}/sqlframe/spark/group.py +0 -0
- {sqlframe-1.6.0 → sqlframe-1.6.2}/sqlframe/spark/readwriter.py +0 -0
- {sqlframe-1.6.0 → sqlframe-1.6.2}/sqlframe/spark/session.py +0 -0
- {sqlframe-1.6.0 → sqlframe-1.6.2}/sqlframe/spark/types.py +0 -0
- {sqlframe-1.6.0 → sqlframe-1.6.2}/sqlframe/spark/window.py +0 -0
- {sqlframe-1.6.0 → sqlframe-1.6.2}/sqlframe/standalone/__init__.py +0 -0
- {sqlframe-1.6.0 → sqlframe-1.6.2}/sqlframe/standalone/catalog.py +0 -0
- {sqlframe-1.6.0 → sqlframe-1.6.2}/sqlframe/standalone/column.py +0 -0
- {sqlframe-1.6.0 → sqlframe-1.6.2}/sqlframe/standalone/dataframe.py +0 -0
- {sqlframe-1.6.0 → sqlframe-1.6.2}/sqlframe/standalone/functions.py +0 -0
- {sqlframe-1.6.0 → sqlframe-1.6.2}/sqlframe/standalone/group.py +0 -0
- {sqlframe-1.6.0 → sqlframe-1.6.2}/sqlframe/standalone/readwriter.py +0 -0
- {sqlframe-1.6.0 → sqlframe-1.6.2}/sqlframe/standalone/session.py +0 -0
- {sqlframe-1.6.0 → sqlframe-1.6.2}/sqlframe/standalone/types.py +0 -0
- {sqlframe-1.6.0 → sqlframe-1.6.2}/sqlframe/standalone/window.py +0 -0
- {sqlframe-1.6.0 → sqlframe-1.6.2}/sqlframe.egg-info/SOURCES.txt +0 -0
- {sqlframe-1.6.0 → sqlframe-1.6.2}/sqlframe.egg-info/dependency_links.txt +0 -0
- {sqlframe-1.6.0 → sqlframe-1.6.2}/sqlframe.egg-info/top_level.txt +0 -0
- {sqlframe-1.6.0 → sqlframe-1.6.2}/tests/__init__.py +0 -0
- {sqlframe-1.6.0 → sqlframe-1.6.2}/tests/common_fixtures.py +0 -0
- {sqlframe-1.6.0 → sqlframe-1.6.2}/tests/conftest.py +0 -0
- {sqlframe-1.6.0 → sqlframe-1.6.2}/tests/fixtures/employee.csv +0 -0
- {sqlframe-1.6.0 → sqlframe-1.6.2}/tests/fixtures/employee.json +0 -0
- {sqlframe-1.6.0 → sqlframe-1.6.2}/tests/fixtures/employee.parquet +0 -0
- {sqlframe-1.6.0 → sqlframe-1.6.2}/tests/fixtures/employee_extra_line.csv +0 -0
- {sqlframe-1.6.0 → sqlframe-1.6.2}/tests/integration/__init__.py +0 -0
- {sqlframe-1.6.0 → sqlframe-1.6.2}/tests/integration/engines/__init__.py +0 -0
- {sqlframe-1.6.0 → sqlframe-1.6.2}/tests/integration/engines/bigquery/__init__.py +0 -0
- {sqlframe-1.6.0 → sqlframe-1.6.2}/tests/integration/engines/bigquery/test_bigquery_catalog.py +0 -0
- {sqlframe-1.6.0 → sqlframe-1.6.2}/tests/integration/engines/bigquery/test_bigquery_session.py +0 -0
- {sqlframe-1.6.0 → sqlframe-1.6.2}/tests/integration/engines/duck/__init__.py +0 -0
- {sqlframe-1.6.0 → sqlframe-1.6.2}/tests/integration/engines/duck/test_duckdb_catalog.py +0 -0
- {sqlframe-1.6.0 → sqlframe-1.6.2}/tests/integration/engines/duck/test_duckdb_dataframe.py +0 -0
- {sqlframe-1.6.0 → sqlframe-1.6.2}/tests/integration/engines/duck/test_duckdb_reader.py +0 -0
- {sqlframe-1.6.0 → sqlframe-1.6.2}/tests/integration/engines/duck/test_duckdb_session.py +0 -0
- {sqlframe-1.6.0 → sqlframe-1.6.2}/tests/integration/engines/postgres/__init__.py +0 -0
- {sqlframe-1.6.0 → sqlframe-1.6.2}/tests/integration/engines/postgres/test_postgres_catalog.py +0 -0
- {sqlframe-1.6.0 → sqlframe-1.6.2}/tests/integration/engines/postgres/test_postgres_dataframe.py +0 -0
- {sqlframe-1.6.0 → sqlframe-1.6.2}/tests/integration/engines/postgres/test_postgres_session.py +0 -0
- {sqlframe-1.6.0 → sqlframe-1.6.2}/tests/integration/engines/redshift/__init__.py +0 -0
- {sqlframe-1.6.0 → sqlframe-1.6.2}/tests/integration/engines/redshift/test_redshift_catalog.py +0 -0
- {sqlframe-1.6.0 → sqlframe-1.6.2}/tests/integration/engines/redshift/test_redshift_session.py +0 -0
- {sqlframe-1.6.0 → sqlframe-1.6.2}/tests/integration/engines/snowflake/__init__.py +0 -0
- {sqlframe-1.6.0 → sqlframe-1.6.2}/tests/integration/engines/snowflake/test_snowflake_catalog.py +0 -0
- {sqlframe-1.6.0 → sqlframe-1.6.2}/tests/integration/engines/snowflake/test_snowflake_session.py +0 -0
- {sqlframe-1.6.0 → sqlframe-1.6.2}/tests/integration/engines/spark/__init__.py +0 -0
- {sqlframe-1.6.0 → sqlframe-1.6.2}/tests/integration/engines/spark/test_spark_catalog.py +0 -0
- {sqlframe-1.6.0 → sqlframe-1.6.2}/tests/integration/engines/test_engine_dataframe.py +0 -0
- {sqlframe-1.6.0 → sqlframe-1.6.2}/tests/integration/engines/test_engine_reader.py +0 -0
- {sqlframe-1.6.0 → sqlframe-1.6.2}/tests/integration/engines/test_engine_session.py +0 -0
- {sqlframe-1.6.0 → sqlframe-1.6.2}/tests/integration/engines/test_engine_writer.py +0 -0
- {sqlframe-1.6.0 → sqlframe-1.6.2}/tests/integration/engines/test_int_functions.py +0 -0
- {sqlframe-1.6.0 → sqlframe-1.6.2}/tests/integration/fixtures.py +0 -0
- {sqlframe-1.6.0 → sqlframe-1.6.2}/tests/integration/test_int_dataframe_stats.py +0 -0
- {sqlframe-1.6.0 → sqlframe-1.6.2}/tests/integration/test_int_grouped_data.py +0 -0
- {sqlframe-1.6.0 → sqlframe-1.6.2}/tests/integration/test_int_session.py +0 -0
- {sqlframe-1.6.0 → sqlframe-1.6.2}/tests/types.py +0 -0
- {sqlframe-1.6.0 → sqlframe-1.6.2}/tests/unit/__init__.py +0 -0
- {sqlframe-1.6.0 → sqlframe-1.6.2}/tests/unit/standalone/__init__.py +0 -0
- {sqlframe-1.6.0 → sqlframe-1.6.2}/tests/unit/standalone/fixtures.py +0 -0
- {sqlframe-1.6.0 → sqlframe-1.6.2}/tests/unit/standalone/test_column.py +0 -0
- {sqlframe-1.6.0 → sqlframe-1.6.2}/tests/unit/standalone/test_dataframe.py +0 -0
- {sqlframe-1.6.0 → sqlframe-1.6.2}/tests/unit/standalone/test_dataframe_writer.py +0 -0
- {sqlframe-1.6.0 → sqlframe-1.6.2}/tests/unit/standalone/test_functions.py +0 -0
- {sqlframe-1.6.0 → sqlframe-1.6.2}/tests/unit/standalone/test_session.py +0 -0
- {sqlframe-1.6.0 → sqlframe-1.6.2}/tests/unit/standalone/test_session_case_sensitivity.py +0 -0
- {sqlframe-1.6.0 → sqlframe-1.6.2}/tests/unit/standalone/test_types.py +0 -0
- {sqlframe-1.6.0 → sqlframe-1.6.2}/tests/unit/standalone/test_window.py +0 -0
- {sqlframe-1.6.0 → sqlframe-1.6.2}/tests/unit/test_util.py +0 -0
|
@@ -247,6 +247,10 @@ class Column:
|
|
|
247
247
|
def alias_or_name(self) -> str:
|
|
248
248
|
return quote_preserving_alias_or_name(self.expression) # type: ignore
|
|
249
249
|
|
|
250
|
+
@property
|
|
251
|
+
def column_alias_or_name(self) -> str:
|
|
252
|
+
return quote_preserving_alias_or_name(self.column_expression) # type: ignore
|
|
253
|
+
|
|
250
254
|
@classmethod
|
|
251
255
|
def ensure_literal(cls, value) -> Column:
|
|
252
256
|
from sqlframe.base.functions import lit
|
|
@@ -668,7 +668,7 @@ class _BaseDataFrame(t.Generic[SESSION, WRITER, NA, STAT, GROUP_DATA]):
|
|
|
668
668
|
cte
|
|
669
669
|
for cte in self.expression.ctes
|
|
670
670
|
if cte.alias_or_name in cte_names_in_join
|
|
671
|
-
and ambiguous_col.
|
|
671
|
+
and ambiguous_col.column_alias_or_name in cte.this.named_selects
|
|
672
672
|
]
|
|
673
673
|
# Check if there is a CTE with this column that we haven't used before. If so, use it. Otherwise,
|
|
674
674
|
# use the same CTE we used before
|
|
@@ -677,7 +677,9 @@ class _BaseDataFrame(t.Generic[SESSION, WRITER, NA, STAT, GROUP_DATA]):
|
|
|
677
677
|
resolved_column_position[ambiguous_col] += 1
|
|
678
678
|
else:
|
|
679
679
|
cte = ctes_with_column[resolved_column_position[ambiguous_col]]
|
|
680
|
-
ambiguous_col.
|
|
680
|
+
ambiguous_col.column_expression.set(
|
|
681
|
+
"table", exp.to_identifier(cte.alias_or_name)
|
|
682
|
+
)
|
|
681
683
|
# If an expression is `CAST(x AS DATETYPE)` then we want to alias so that `x` is the result column name
|
|
682
684
|
columns = [
|
|
683
685
|
col.alias(col.expression.alias_or_name)
|
|
@@ -774,6 +776,8 @@ class _BaseDataFrame(t.Generic[SESSION, WRITER, NA, STAT, GROUP_DATA]):
|
|
|
774
776
|
how: str = "inner",
|
|
775
777
|
**kwargs,
|
|
776
778
|
) -> Self:
|
|
779
|
+
from sqlframe.base.functions import coalesce
|
|
780
|
+
|
|
777
781
|
if on is None:
|
|
778
782
|
logger.warning("Got no value for on. This appears change the join to a cross join.")
|
|
779
783
|
how = "cross"
|
|
@@ -833,7 +837,15 @@ class _BaseDataFrame(t.Generic[SESSION, WRITER, NA, STAT, GROUP_DATA]):
|
|
|
833
837
|
for left_column, right_column in join_column_pairs
|
|
834
838
|
],
|
|
835
839
|
)
|
|
836
|
-
join_column_names = [
|
|
840
|
+
join_column_names = [
|
|
841
|
+
coalesce(
|
|
842
|
+
left_col.sql(dialect=self.session.input_dialect),
|
|
843
|
+
right_col.sql(dialect=self.session.input_dialect),
|
|
844
|
+
).alias(left_col.alias_or_name)
|
|
845
|
+
if how == "full"
|
|
846
|
+
else left_col.alias_or_name
|
|
847
|
+
for left_col, right_col in join_column_pairs
|
|
848
|
+
]
|
|
837
849
|
# To match spark behavior only the join clause gets deduplicated and it gets put in the front of the column list
|
|
838
850
|
select_column_names = [
|
|
839
851
|
(
|
|
@@ -846,7 +858,10 @@ class _BaseDataFrame(t.Generic[SESSION, WRITER, NA, STAT, GROUP_DATA]):
|
|
|
846
858
|
select_column_names = [
|
|
847
859
|
column_name
|
|
848
860
|
for column_name in select_column_names
|
|
849
|
-
if column_name
|
|
861
|
+
if column_name
|
|
862
|
+
not in [
|
|
863
|
+
x.alias_or_name if not isinstance(x, str) else x for x in join_column_names
|
|
864
|
+
]
|
|
850
865
|
]
|
|
851
866
|
select_column_names = join_column_names + select_column_names
|
|
852
867
|
else:
|
|
@@ -375,7 +375,7 @@ def test_join_inner(
|
|
|
375
375
|
pyspark_employee["fname"],
|
|
376
376
|
F.col("lname"),
|
|
377
377
|
F.col("age"),
|
|
378
|
-
F.col("store_id"),
|
|
378
|
+
F.col("store_id").alias("renamed_store_id"),
|
|
379
379
|
pyspark_store.store_name,
|
|
380
380
|
pyspark_store["num_sales"],
|
|
381
381
|
)
|
|
@@ -384,7 +384,7 @@ def test_join_inner(
|
|
|
384
384
|
employee["fname"],
|
|
385
385
|
SF.col("lname"),
|
|
386
386
|
SF.col("age"),
|
|
387
|
-
SF.col("store_id"),
|
|
387
|
+
SF.col("store_id").alias("renamed_store_id"),
|
|
388
388
|
store.store_name,
|
|
389
389
|
store["num_sales"],
|
|
390
390
|
)
|
|
@@ -2057,3 +2057,48 @@ def test_transform(
|
|
|
2057
2057
|
df = pyspark_employee.transform(cast_all_to_int_pyspark).transform(sort_columns_asc)
|
|
2058
2058
|
dfs = employee.transform(cast_all_to_int_sqlframe).transform(sort_columns_asc)
|
|
2059
2059
|
compare_frames(df, dfs)
|
|
2060
|
+
|
|
2061
|
+
|
|
2062
|
+
# https://github.com/eakmanrq/sqlframe/issues/51
|
|
2063
|
+
def test_join_full_outer_no_match(
|
|
2064
|
+
pyspark_employee: PySparkDataFrame,
|
|
2065
|
+
get_df: t.Callable[[str], _BaseDataFrame],
|
|
2066
|
+
compare_frames: t.Callable,
|
|
2067
|
+
):
|
|
2068
|
+
spark = pyspark_employee._session
|
|
2069
|
+
initial = spark.createDataFrame(
|
|
2070
|
+
[
|
|
2071
|
+
(1, "data"),
|
|
2072
|
+
(2, "data"),
|
|
2073
|
+
],
|
|
2074
|
+
["id", "data"],
|
|
2075
|
+
)
|
|
2076
|
+
for_join = spark.createDataFrame(
|
|
2077
|
+
[
|
|
2078
|
+
(1, "other_data"),
|
|
2079
|
+
(2, "other_data"),
|
|
2080
|
+
(3, "other_data"),
|
|
2081
|
+
],
|
|
2082
|
+
["id", "other_data"],
|
|
2083
|
+
)
|
|
2084
|
+
df = initial.join(for_join, on="id", how="full")
|
|
2085
|
+
|
|
2086
|
+
session = get_df("employee").session
|
|
2087
|
+
dfs_initial = session.createDataFrame(
|
|
2088
|
+
[
|
|
2089
|
+
(1, "data"),
|
|
2090
|
+
(2, "data"),
|
|
2091
|
+
],
|
|
2092
|
+
["id", "data"],
|
|
2093
|
+
)
|
|
2094
|
+
dfs_for_join = session.createDataFrame(
|
|
2095
|
+
[
|
|
2096
|
+
(1, "other_data"),
|
|
2097
|
+
(2, "other_data"),
|
|
2098
|
+
(3, "other_data"),
|
|
2099
|
+
],
|
|
2100
|
+
["id", "other_data"],
|
|
2101
|
+
)
|
|
2102
|
+
dfs = dfs_initial.join(dfs_for_join, on="id", how="full")
|
|
2103
|
+
|
|
2104
|
+
compare_frames(df, dfs)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{sqlframe-1.6.0 → sqlframe-1.6.2}/tests/integration/engines/bigquery/test_bigquery_catalog.py
RENAMED
|
File without changes
|
{sqlframe-1.6.0 → sqlframe-1.6.2}/tests/integration/engines/bigquery/test_bigquery_session.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{sqlframe-1.6.0 → sqlframe-1.6.2}/tests/integration/engines/postgres/test_postgres_catalog.py
RENAMED
|
File without changes
|
{sqlframe-1.6.0 → sqlframe-1.6.2}/tests/integration/engines/postgres/test_postgres_dataframe.py
RENAMED
|
File without changes
|
{sqlframe-1.6.0 → sqlframe-1.6.2}/tests/integration/engines/postgres/test_postgres_session.py
RENAMED
|
File without changes
|
|
File without changes
|
{sqlframe-1.6.0 → sqlframe-1.6.2}/tests/integration/engines/redshift/test_redshift_catalog.py
RENAMED
|
File without changes
|
{sqlframe-1.6.0 → sqlframe-1.6.2}/tests/integration/engines/redshift/test_redshift_session.py
RENAMED
|
File without changes
|
|
File without changes
|
{sqlframe-1.6.0 → sqlframe-1.6.2}/tests/integration/engines/snowflake/test_snowflake_catalog.py
RENAMED
|
File without changes
|
{sqlframe-1.6.0 → sqlframe-1.6.2}/tests/integration/engines/snowflake/test_snowflake_session.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|