Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

SEA volume operations fix: assignmanifest.is_volume_operation tois_staging_operation inExecuteResponse#610

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
varun-edachali-dbx merged 4 commits intosea-migrationfromvolume-ops-fix
Jun 26, 2025
Merged
Show file tree
Hide file tree
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletionsrc/databricks/sql/backend/sea/backend.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -353,7 +353,7 @@ def _results_message_to_execute_response(
description=description,
has_been_closed_server_side=False,
lz4_compressed=lz4_compressed,
is_staging_operation=False,
is_staging_operation=response.manifest.is_volume_operation,
arrow_schema_bytes=None,
result_format=response.manifest.format,
)
Expand Down
2 changes: 1 addition & 1 deletionsrc/databricks/sql/backend/sea/models/base.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -92,4 +92,4 @@ class ResultManifest:
truncated: bool = False
chunks: Optional[List[ChunkInfo]] = None
result_compression: Optional[str] = None
is_volume_operation:Optional[bool] =None
is_volume_operation: bool =False
2 changes: 1 addition & 1 deletionsrc/databricks/sql/backend/sea/models/responses.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -65,7 +65,7 @@ def _parse_manifest(data: Dict[str, Any]) -> ResultManifest:
truncated=manifest_data.get("truncated", False),
chunks=chunks,
result_compression=manifest_data.get("result_compression"),
is_volume_operation=manifest_data.get("is_volume_operation"),
is_volume_operation=manifest_data.get("is_volume_operation", False),
)


Expand Down
25 changes: 25 additions & 0 deletionstests/unit/test_sea_backend.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -633,6 +633,31 @@ def test_utility_methods(self, sea_client):
sea_client._extract_description_from_manifest(no_columns_manifest) is None
)

def test_results_message_to_execute_response_is_staging_operation(self, sea_client):
"""Test that is_staging_operation is correctly set from manifest.is_volume_operation."""
# Test when is_volume_operation is True
response = MagicMock()
response.statement_id = "test-statement-123"
response.status.state = CommandState.SUCCEEDED
response.manifest.is_volume_operation = True
response.manifest.result_compression = "NONE"
response.manifest.format = "JSON_ARRAY"

# Mock the _extract_description_from_manifest method to return None
with patch.object(
sea_client, "_extract_description_from_manifest", return_value=None
):
result = sea_client._results_message_to_execute_response(response)
assert result.is_staging_operation is True

# Test when is_volume_operation is False
response.manifest.is_volume_operation = False
with patch.object(
sea_client, "_extract_description_from_manifest", return_value=None
):
result = sea_client._results_message_to_execute_response(response)
assert result.is_staging_operation is False

def test_get_catalogs(self, sea_client, sea_session_id, mock_cursor):
"""Test the get_catalogs method."""
# Mock the execute_command method
Expand Down
Loading

[8]ページ先頭

©2009-2025 Movatter.jp