Skip to content

Commit df527ce

Browse files
committed
odpstable-fix-#820
1 parent a6f63b1 commit df527ce

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

core/src/main/scala/za/co/absa/spline/harvester/plugin/embedded/DataSourceV2Plugin.scala

+5
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,8 @@ class DataSourceV2Plugin
164164
SourceIdentifier(Some(format), pathUris: _*)
165165

166166
case `_: TableV2`(tv2) => extractSourceIdFromDeltaTableV2(tv2)
167+
168+
case `_: OdpsTable`(ot) => SourceIdentifier(Some("odpstable"),s"odpstable:${extractValue[String](ot,"name")}")
167169
}
168170

169171
private def extractSourceIdFromDeltaTableV2(table: AnyRef): SourceIdentifier = {
@@ -231,4 +233,7 @@ object DataSourceV2Plugin {
231233
private object `_: TableV2` extends SafeTypeMatchingExtractor[AnyRef](
232234
"org.apache.spark.sql.connector.catalog.Table")
233235

236+
private object `_: OdpsTable` extends SafeTypeMatchingExtractor[AnyRef](
237+
"org.apache.spark.sql.execution.datasources.v2.odps.OdpsTable")
238+
234239
}

0 commit comments

Comments
 (0)