Skip to content

Commit d83ba2a

Browse files
update docstring
1 parent 81d5a8c commit d83ba2a

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

tests/ast/decoder.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111
from pandas import DataFrame as PandasDataFrame
1212

13+
from snowflake.snowpark.table import WhenMatchedClause, WhenNotMatchedClause
1314
from snowflake.snowpark.window import Window, WindowRelativePosition
1415
import snowflake.snowpark._internal.proto.generated.ast_pb2 as proto
1516

@@ -536,14 +537,21 @@ def decode_join_type(self, join_type: proto.SpJoinType) -> str:
536537
"Unknown join type: %s" % join_type.WhichOneof("variant")
537538
)
538539

539-
def decode_matched_clause(self, matched_clause: proto.SpMatchedClause):
540+
def decode_matched_clause(
541+
self, matched_clause: proto.SpMatchedClause
542+
) -> Union[WhenMatchedClause, WhenNotMatchedClause]:
540543
"""
541544
Decode a matched clause expression to get the clause.
542545
543546
Parameters
544547
----------
545548
matched_clause : proto.SpMatchedClause
546549
The expression to decode.
550+
551+
Returns
552+
-------
553+
WhenMatchedClause or WhenNotMatchedClause
554+
The decoded clause.
547555
"""
548556
match matched_clause.WhichOneof("variant"):
549557
case "sp_merge_delete_when_matched_clause":

0 commit comments

Comments
 (0)