pan3793 commented on code in PR #54411:
URL: https://github.com/apache/spark/pull/54411#discussion_r2836069358
##########
sql/catalyst/src/test/scala/org/apache/spark/sql/connector/catalog/InMemoryTable.scala:
##########
@@ -261,3 +263,71 @@ object InMemoryTable {
}
}
}
+
+/**
+ * A metadata table that returns snapshot (commit) information for a parent
table.
+ * Simulates data source metadata tables like Iceberg's db.table.snapshots.
+ */
+class InMemorySnapshotsTable(parentTable: InMemoryTable) extends Table with
SupportsRead {
+ override def name(): String = parentTable.name + ".snapshots"
+
+ override def schema(): StructType = StructType(Seq(
+ StructField("committed_at", LongType, nullable = false),
+ StructField("snapshot_id", LongType, nullable = false)
+ ))
+
+ override def capabilities(): util.Set[TableCapability] = {
Review Comment:
> By the way, what do you mean read only? (I dont think there's such DSV2
concept yet?)
Just ignore it, I might be getting bogged down in the implementation details
of Iceberg. It's an invalid question for a general multi-part namespace table
name, from Spark DSv2 perspective.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]