Skip to content

Commit

Permalink
Add AVRO to supported format to be upgraded by SYNC (#1134)
Browse files Browse the repository at this point in the history
  • Loading branch information
qziyuan authored Mar 27, 2024
1 parent ca3ea35 commit e4a8354
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/databricks/labs/ucx/hive_metastore/tables.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ def is_dbfs_root(self) -> bool:
def is_format_supported_for_sync(self) -> bool:
if self.table_format is None:
return False
return self.table_format.upper() in {"DELTA", "PARQUET", "CSV", "JSON", "ORC", "TEXT"}
return self.table_format.upper() in {"DELTA", "PARQUET", "CSV", "JSON", "ORC", "TEXT", "AVRO"}

@property
def is_databricks_dataset(self) -> bool:
Expand Down
3 changes: 2 additions & 1 deletion tests/unit/hive_metastore/test_tables.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,8 @@ def test_is_db_dataset(table, db_dataset):
(Table("a", "b", "c", "EXTERNAL", "TEXT", location="dbfs:/somelocation/tablename"), True),
(Table("a", "b", "c", "EXTERNAL", "ORC", location="dbfs:/somelocation/tablename"), True),
(Table("a", "b", "c", "EXTERNAL", "JSON", location="dbfs:/somelocation/tablename"), True),
(Table("a", "b", "c", "EXTERNAL", "AVRO", location="dbfs:/somelocation/tablename"), False),
(Table("a", "b", "c", "EXTERNAL", "AVRO", location="dbfs:/somelocation/tablename"), True),
(Table("a", "b", "c", "EXTERNAL", "BINARYFILE", location="dbfs:/somelocation/tablename"), False),
],
)
def test_is_supported_for_sync(table, supported):
Expand Down

0 comments on commit e4a8354

Please sign in to comment.