MINOR: Databricks LocationPath Update Fix (#18815)

This commit is contained in:
Mayur Singal 2024-11-27 18:38:26 +05:30 committed by ulixius9
parent 74728375c4
commit fea8beb7c3
3 changed files with 3 additions and 4 deletions

View File

@ -94,6 +94,7 @@ ALLOWED_COMMON_PATCH_FIELDS = {
"tableConstraints": True,
"tablePartition": True,
"location": True,
"locationPath": True,
"schemaDefinition": True,
"sampleData": True,
"fileFormat": True,

View File

@ -125,7 +125,7 @@ def _get_table_columns(self, connection, table_name, schema, db_name):
query = DATABRICKS_GET_TABLE_COMMENTS.format(
database_name=db_name, schema_name=schema, table_name=table_name
)
cursor = get_table_comment_result(
rows = get_table_comment_result(
self,
connection=connection,
query=query,
@ -134,8 +134,6 @@ def _get_table_columns(self, connection, table_name, schema, db_name):
schema=schema,
)
rows = cursor.fetchall()
except exc.OperationalError as e:
# Does the table exist?
regex_fmt = r"TExecuteStatementResp.*SemanticException.*Table not found {}"

View File

@ -180,7 +180,7 @@ def get_table_comment_results(
"""
self.table_comment_result: Dict[Tuple[str, str], str] = {}
self.current_db: str = database
result = connection.execute(query)
result = connection.execute(query).fetchall()
self.table_comment_result[(table_name, schema)] = result