Skip to content

Commit e4a8354

Browse files
authored
Add AVRO to supported format to be upgraded by SYNC (#1134)
1 parent ca3ea35 commit e4a8354

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/databricks/labs/ucx/hive_metastore/tables.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ def is_dbfs_root(self) -> bool:
109109
def is_format_supported_for_sync(self) -> bool:
110110
if self.table_format is None:
111111
return False
112-
return self.table_format.upper() in {"DELTA", "PARQUET", "CSV", "JSON", "ORC", "TEXT"}
112+
return self.table_format.upper() in {"DELTA", "PARQUET", "CSV", "JSON", "ORC", "TEXT", "AVRO"}
113113

114114
@property
115115
def is_databricks_dataset(self) -> bool:

tests/unit/hive_metastore/test_tables.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,8 @@ def test_is_db_dataset(table, db_dataset):
193193
(Table("a", "b", "c", "EXTERNAL", "TEXT", location="dbfs:/somelocation/tablename"), True),
194194
(Table("a", "b", "c", "EXTERNAL", "ORC", location="dbfs:/somelocation/tablename"), True),
195195
(Table("a", "b", "c", "EXTERNAL", "JSON", location="dbfs:/somelocation/tablename"), True),
196-
(Table("a", "b", "c", "EXTERNAL", "AVRO", location="dbfs:/somelocation/tablename"), False),
196+
(Table("a", "b", "c", "EXTERNAL", "AVRO", location="dbfs:/somelocation/tablename"), True),
197+
(Table("a", "b", "c", "EXTERNAL", "BINARYFILE", location="dbfs:/somelocation/tablename"), False),
197198
],
198199
)
199200
def test_is_supported_for_sync(table, supported):

0 commit comments

Comments
 (0)