sqlframe 3.9.0__py3-none-any.whl → 3.9.1__py3-none-any.whl
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/_version.py +2 -2
- sqlframe/base/dataframe.py +8 -0
- {sqlframe-3.9.0.dist-info → sqlframe-3.9.1.dist-info}/METADATA +1 -1
- {sqlframe-3.9.0.dist-info → sqlframe-3.9.1.dist-info}/RECORD +7 -7
- {sqlframe-3.9.0.dist-info → sqlframe-3.9.1.dist-info}/LICENSE +0 -0
- {sqlframe-3.9.0.dist-info → sqlframe-3.9.1.dist-info}/WHEEL +0 -0
- {sqlframe-3.9.0.dist-info → sqlframe-3.9.1.dist-info}/top_level.txt +0 -0
sqlframe/_version.py
CHANGED
sqlframe/base/dataframe.py
CHANGED
|
@@ -866,6 +866,7 @@ class _BaseDataFrame(t.Generic[SESSION, WRITER, NA, STAT, GROUP_DATA]):
|
|
|
866
866
|
if on is None:
|
|
867
867
|
logger.warning("Got no value for on. This appears to change the join to a cross join.")
|
|
868
868
|
how = "cross"
|
|
869
|
+
|
|
869
870
|
other_df = other_df._convert_leaf_to_cte()
|
|
870
871
|
join_expression = self._add_ctes_to_expression(self.expression, other_df.expression.ctes)
|
|
871
872
|
# We will determine actual "join on" expression later so we don't provide it at first
|
|
@@ -875,6 +876,13 @@ class _BaseDataFrame(t.Generic[SESSION, WRITER, NA, STAT, GROUP_DATA]):
|
|
|
875
876
|
self_columns = self._get_outer_select_columns(join_expression)
|
|
876
877
|
other_columns = self._get_outer_select_columns(other_df.expression)
|
|
877
878
|
join_columns = self._ensure_and_normalize_cols(on)
|
|
879
|
+
# If the two dataframes being joined come from the same branch and reference the same table,
|
|
880
|
+
# then really one of the tables was supposed to reference the other dataframe so we update it to do that.
|
|
881
|
+
if self.branch_id == other_df.branch_id:
|
|
882
|
+
for col in join_columns:
|
|
883
|
+
for eq in col.expression.find_all(exp.EQ):
|
|
884
|
+
if eq.this.table == eq.expression.table:
|
|
885
|
+
eq.expression.set("table", exp.to_identifier(other_df.latest_cte_name))
|
|
878
886
|
# Determines the join clause and select columns to be used passed on what type of columns were provided for
|
|
879
887
|
# the join. The columns returned changes based on how the on expression is provided.
|
|
880
888
|
if how != "cross":
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
sqlframe/__init__.py,sha256=wfqm98eLoLid9oV_FzzpG5loKC6LxOhj2lXpfN7SARo,3138
|
|
2
|
-
sqlframe/_version.py,sha256=
|
|
2
|
+
sqlframe/_version.py,sha256=juEjthQzCmK7Szp2cv6Mn7hKjzVyOZ5uyw49uPvQDw8,411
|
|
3
3
|
sqlframe/base/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
4
4
|
sqlframe/base/_typing.py,sha256=b2clI5HI1zEZKB_3Msx3FeAJQyft44ubUifJwQRVXyQ,1298
|
|
5
5
|
sqlframe/base/catalog.py,sha256=SzFQalTWdhWzxUY-4ut1f9TfOECp_JmJEgNPfrRKCe0,38457
|
|
6
6
|
sqlframe/base/column.py,sha256=06fhVZ2nCn2QLxnfjdK-oYKeTFJC_smgSxu7u2UYlVg,17878
|
|
7
|
-
sqlframe/base/dataframe.py,sha256=
|
|
7
|
+
sqlframe/base/dataframe.py,sha256=sPSffZHmFUA_uwQXnwhUhwx4xtXorRXRipATmklSXOw,73442
|
|
8
8
|
sqlframe/base/decorators.py,sha256=Jy4bf8MhZ-AJ6CWTj59bBJRqamtLbPC0USUMFrY6g0w,449
|
|
9
9
|
sqlframe/base/exceptions.py,sha256=9Uwvqn2eAkDpqm4BrRgbL61qM-GMCbJEMAW8otxO46s,370
|
|
10
10
|
sqlframe/base/function_alternatives.py,sha256=jofb2-nweefqcjUsd4xVqfRmJSZ-T_0Iq5roW2pL0OA,50768
|
|
@@ -119,8 +119,8 @@ sqlframe/standalone/udf.py,sha256=azmgtUjHNIPs0WMVNId05SHwiYn41MKVBhKXsQJ5dmY,27
|
|
|
119
119
|
sqlframe/standalone/window.py,sha256=6GKPzuxeSapJakBaKBeT9VpED1ACdjggDv9JRILDyV0,35
|
|
120
120
|
sqlframe/testing/__init__.py,sha256=VVCosQhitU74A3NnE52O4mNtGZONapuEXcc20QmSlnQ,132
|
|
121
121
|
sqlframe/testing/utils.py,sha256=9DDYVuocO7tygee3RaajuJNZ24sJwf_LY556kKg7kTw,13011
|
|
122
|
-
sqlframe-3.9.
|
|
123
|
-
sqlframe-3.9.
|
|
124
|
-
sqlframe-3.9.
|
|
125
|
-
sqlframe-3.9.
|
|
126
|
-
sqlframe-3.9.
|
|
122
|
+
sqlframe-3.9.1.dist-info/LICENSE,sha256=VZu79YgW780qxaFJMr0t5ZgbOYEh04xWoxaWOaqIGWk,1068
|
|
123
|
+
sqlframe-3.9.1.dist-info/METADATA,sha256=IKeqsU6mGTjVsFUwUVMY4xDpzIEmIhNC3ox0uWaDkQs,9142
|
|
124
|
+
sqlframe-3.9.1.dist-info/WHEEL,sha256=G16H4A3IeoQmnOrYV4ueZGKSjhipXx8zc8nu9FGlvMA,92
|
|
125
|
+
sqlframe-3.9.1.dist-info/top_level.txt,sha256=T0_RpoygaZSF6heeWwIDQgaP0varUdSK1pzjeJZRjM8,9
|
|
126
|
+
sqlframe-3.9.1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|