Skip to content

Commit

Permalink
Fix return type hint of retryable
Browse files Browse the repository at this point in the history
  • Loading branch information
JCZuurmond committed Sep 30, 2024
1 parent 1f0b0a8 commit 44513b3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/databricks/labs/lsql/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,10 +120,11 @@ def __repr__(self):
return f"Row({', '.join(f'{k}={v!r}' for (k, v) in zip(self.__columns__, self, strict=True))})"


def _is_retryable_delta_concurrent_append(e: BaseException) -> str:
def _is_retryable_delta_concurrent_append(e: BaseException) -> str | None:
"""Retry a concurrent append to a delta table"""
if isinstance(e, BadRequest) and "DELTA_CONCURRENT_APPEND" in str(e):
return "Concurrent append"
return None


class StatementExecutionExt:
Expand Down

0 comments on commit 44513b3

Please sign in to comment.