Fixes #5800 profiler workflow for engine with catalog + modulo for Presto (#5801)

This commit is contained in:
Teddy 2022-06-30 14:58:30 +02:00 committed by GitHub
parent 49d47524ea
commit 861a5ecf59
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 1 deletions

View File

@ -198,7 +198,14 @@ class ProfilerWorkflow:
if hasattr(
self.config.source.serviceConnection.__root__.config, "supportsDatabase"
):
copy_service_connection_config.database = database.name.__root__
if hasattr(
self.config.source.serviceConnection.__root__.config, "database"
):
copy_service_connection_config.database = database.name.__root__
if hasattr(
self.config.source.serviceConnection.__root__.config, "catalog"
):
copy_service_connection_config.catalog = database.name.__root__
self.create_processor(copy_service_connection_config)

View File

@ -60,6 +60,7 @@ def _(element, compiler, **kw):
@compiles(ModuloFn, Dialects.Athena)
@compiles(ModuloFn, Dialects.MySQL)
@compiles(ModuloFn, Dialects.Oracle)
@compiles(ModuloFn, Dialects.Presto)
def _(element, compiler, **kw):
value, base = validate_and_compile(element, compiler, **kw)