Skip to content

Commit c645b10

Browse files
Merge branch 'refs/heads/main' into feature/aherrera/SNOW-2443512-StringAndBinaryPart2
# Conflicts: # CHANGELOG.md
2 parents e24b5ac + c5fdf7a commit c645b10

30 files changed

+2534
-858
lines changed

CHANGELOG.md

Lines changed: 27 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,24 @@
66

77
#### New Features
88

9+
- Added support for `Session.client_telemetry`.
910
- Added support for `Session.udf_profiler`.
11+
- Added support for the following functions in `functions.py`:
12+
- String and binary functions:
13+
- `hex_decode_string`
14+
- `jarowinkler_similarity`
15+
- `parse_url`
16+
- `regexp_instr`
17+
- `regexp_like`
18+
- `regexp_substr`
19+
- `regexp_substr_all`
20+
- `rtrimmed_length`
21+
- `space`
22+
- `split_part`
1023

1124
#### Improvements
1225

26+
- Enhanced `DataFrame.sort()` to support `ORDER BY ALL` when no columns are specified.
1327
- Catalog API now uses SQL commands instead of SnowAPI calls. This new implementation is more reliable now.
1428

1529
#### Dependency Updates
@@ -34,6 +48,16 @@
3448
- `groupby.nunique`
3549
- `groupby.size`
3650
- `concat`
51+
- `copy`
52+
- `str.isdigit`
53+
- `str.islower`
54+
- `str.isupper`
55+
- `str.istitle`
56+
- `str.lower`
57+
- `str.upper`
58+
- `str.title`
59+
60+
- Make faster pandas disabled by default (opt-in instead of opt-out).
3761

3862
## 1.41.0 (2025-10-23)
3963

@@ -92,17 +116,9 @@
92116
- `st_geometryfromwkt`
93117
- `try_to_geography`
94118
- `try_to_geometry`
95-
- String and binary functions:
96-
- `hex_decode_string`
97-
- `jarowinkler_similarity`
98-
- `parse_url`
99-
- `regexp_instr`
100-
- `regexp_like`
101-
- `regexp_substr`
102-
- `regexp_substr_all`
103-
- `rtrimmed_length`
104-
- `space`
105-
- `split_part`
119+
120+
#### Improvements
121+
106122
- Added a parameter to enable and disable automatic column name aliasing for `interval_day_time_from_parts` and `interval_year_month_from_parts` functions.
107123

108124
#### Bug Fixes

setup.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,7 @@ def run(self):
230230
"opentelemetry": [
231231
"opentelemetry-api>=1.0.0, <2.0.0",
232232
"opentelemetry-sdk>=1.0.0, <2.0.0",
233+
"opentelemetry-exporter-otlp>=1.0.0, <2.0.0",
233234
],
234235
},
235236
classifiers=[

src/snowflake/snowpark/_internal/analyzer/analyzer.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,10 @@
114114
SnowflakeTable,
115115
SnowflakeValues,
116116
)
117-
from snowflake.snowpark._internal.analyzer.sort_expression import SortOrder
117+
from snowflake.snowpark._internal.analyzer.sort_expression import (
118+
SortOrder,
119+
SortByAllOrder,
120+
)
118121
from snowflake.snowpark._internal.analyzer.table_function import (
119122
FlattenFunction,
120123
GeneratorTableFunction,
@@ -558,6 +561,13 @@ def analyze(
558561
expr.null_ordering.sql,
559562
)
560563

564+
if isinstance(expr, SortByAllOrder):
565+
return order_expression(
566+
"ALL",
567+
expr.direction.sql,
568+
expr.null_ordering.sql,
569+
)
570+
561571
if isinstance(expr, ScalarSubquery):
562572
self.subquery_plans.append(expr.plan)
563573
return subquery_expression(expr.plan.queries[-1].sql)

src/snowflake/snowpark/_internal/analyzer/sort_expression.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,3 +59,23 @@ def dependent_column_names(self) -> Optional[AbstractSet[str]]:
5959

6060
def dependent_column_names_with_duplication(self) -> List[str]:
6161
return derive_dependent_columns_with_duplication(self.child)
62+
63+
64+
class SortByAllOrder(Expression):
65+
def __init__(
66+
self,
67+
direction: SortDirection,
68+
null_ordering: Optional[NullOrdering] = None,
69+
) -> None:
70+
super().__init__()
71+
self.child: Expression
72+
self.direction = direction
73+
self.null_ordering = (
74+
null_ordering if null_ordering else direction.default_null_ordering
75+
)
76+
77+
def dependent_column_names(self) -> Optional[AbstractSet[str]]:
78+
return derive_dependent_columns(self.child)
79+
80+
def dependent_column_names_with_duplication(self) -> List[str]:
81+
return derive_dependent_columns_with_duplication(self.child)

src/snowflake/snowpark/_internal/analyzer/unary_plan_node.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,10 @@
1717
from snowflake.snowpark._internal.analyzer.snowflake_plan_node import (
1818
DynamicTableCreateMode,
1919
)
20-
from snowflake.snowpark._internal.analyzer.sort_expression import SortOrder
20+
from snowflake.snowpark._internal.analyzer.sort_expression import (
21+
SortOrder,
22+
SortByAllOrder,
23+
)
2124

2225

2326
class UnaryNode(LogicalPlan):
@@ -90,7 +93,7 @@ def individual_node_complexity(self) -> Dict[PlanNodeCategory, int]:
9093
class Sort(UnaryNode):
9194
def __init__(
9295
self,
93-
order: List[SortOrder],
96+
order: Union[List[SortOrder], List[SortByAllOrder]],
9497
child: LogicalPlan,
9598
is_order_by_append: bool = False,
9699
) -> None:

0 commit comments

Comments
 (0)