Skip to content

Commit

Permalink
fix(ingest/trino): variable reference before define (#10646)
Browse files Browse the repository at this point in the history
  • Loading branch information
anshbansal authored Jun 6, 2024
1 parent 12455f9 commit 3b8cda6
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1180,6 +1180,7 @@ def _generate_single_profile(
if custom_sql is not None:
ge_config["query"] = custom_sql

batch = None
with self._ge_context() as ge_context, PerfTimer() as timer:
try:
logger.info(f"Profiling {pretty_name}")
Expand Down Expand Up @@ -1219,7 +1220,7 @@ def _generate_single_profile(
self.report.report_warning(pretty_name, f"Profiling exception {e}")
return None
finally:
if self.base_engine.engine.name == TRINO:
if batch is not None and self.base_engine.engine.name == TRINO:
self._drop_trino_temp_table(batch)

def _get_ge_dataset(
Expand Down

0 comments on commit 3b8cda6

Please sign in to comment.