-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add temporary_udf_name to QueryHandlerContext
- Loading branch information
Showing
7 changed files
with
69 additions
and
6 deletions.
There are no files selected for viewing
17 changes: 17 additions & 0 deletions
17
exasol_advanced_analytics_framework/query_handler/context/proxy/drop_udf_query.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
from exasol_data_science_utils_python.schema.udf_name import UDFName | ||
|
||
from exasol_advanced_analytics_framework.query_handler.query.drop_query import DropQuery | ||
|
||
|
||
class DropUDFQuery(DropQuery): | ||
|
||
def __init__(self, udf_name: UDFName): | ||
self._udf_name = udf_name | ||
|
||
@property | ||
def query_string(self) -> str: | ||
return f"DROP SCRIPT IF EXISTS {self._udf_name.fully_qualified};" | ||
|
||
@property | ||
def table_name(self) -> UDFName: | ||
return self._udf_name |
15 changes: 15 additions & 0 deletions
15
exasol_advanced_analytics_framework/query_handler/context/proxy/udf_name_proxy.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
from exasol_data_science_utils_python.schema.udf_name import UDFName | ||
|
||
from exasol_advanced_analytics_framework.query_handler.context.proxy.db_object_name_with_schema_proxy import \ | ||
DBObjectNameWithSchemaProxy | ||
from exasol_advanced_analytics_framework.query_handler.context.proxy.drop_udf_query import DropUDFQuery | ||
from exasol_advanced_analytics_framework.query_handler.query.query import Query | ||
|
||
|
||
class UDFNameProxy(DBObjectNameWithSchemaProxy[UDFName], UDFName): | ||
|
||
def get_cleanup_query(self) -> Query: | ||
return DropUDFQuery(self._db_object_name) | ||
|
||
def __init__(self, script_name: UDFName, global_counter_value: int): | ||
super().__init__(script_name, global_counter_value) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,3 +3,7 @@ | |
|
||
class DropyQuery(Query): | ||
pass | ||
|
||
|
||
class DropQuery(Query): | ||
pass |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
exasol_advanced_analytics_framework/query_handler/query/drop_view_query.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters