Skip to content

Commit 242307a

Browse files
run some tests for sea
Signed-off-by: varun-edachali-dbx <varun.edachali@databricks.com>
1 parent 50cc1e2 commit 242307a

File tree

4 files changed

+282
-112
lines changed

4 files changed

+282
-112
lines changed

src/databricks/sql/backend/sea/backend.py

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
WaitTimeout,
1313
MetadataCommands,
1414
)
15+
from databricks.sql.thrift_api.TCLIService import ttypes
1516

1617
if TYPE_CHECKING:
1718
from databricks.sql.client import Cursor
@@ -403,7 +404,7 @@ def execute_command(
403404
lz4_compression: bool,
404405
cursor: "Cursor",
405406
use_cloud_fetch: bool,
406-
parameters: List[Dict[str, Any]],
407+
parameters: List[ttypes.TSparkParameter],
407408
async_op: bool,
408409
enforce_embedded_schema_correctness: bool,
409410
) -> Union["ResultSet", None]:
@@ -437,9 +438,9 @@ def execute_command(
437438
for param in parameters:
438439
sea_parameters.append(
439440
StatementParameter(
440-
name=param["name"],
441-
value=param["value"],
442-
type=param["type"] if "type" in param else None,
441+
name=param.name,
442+
value=param.value.stringValue,
443+
type=param.type,
443444
)
444445
)
445446

@@ -690,9 +691,6 @@ def get_tables(
690691
table_types: Optional[List[str]] = None,
691692
) -> "ResultSet":
692693
"""Get tables by executing 'SHOW TABLES IN catalog [SCHEMA LIKE pattern] [LIKE pattern]'."""
693-
if not catalog_name:
694-
raise ValueError("Catalog name is required for get_tables")
695-
696694
operation = (
697695
MetadataCommands.SHOW_TABLES_ALL_CATALOGS.value
698696
if catalog_name in [None, "*", "%"]

tests/e2e/common/large_queries_mixin.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ def test_long_running_query(self):
8787
and asserts that the query completes successfully.
8888
"""
8989
minutes = 60
90-
min_duration = 5 * minutes
90+
min_duration = 3 * minutes
9191

9292
duration = -1
9393
scale0 = 10000

0 commit comments

Comments
 (0)