Expand description
Code for incremental view maintenance against Hive-partitioned tables.
An example of a Hive-partitioned table is the ListingTable.
By analyzing the fragment of the materialized view query pertaining to the partition columns,
we can derive a build graph that relates the files of a materialized views and the files of the tables it depends on.
Two central traits are defined:
ListingTableLike: a trait that abstracts Hive-partitioned tables in object storage;Materialized: a materializedListingTableLikedefined by a user-provided query.
Note that all implementations of ListingTableLike and Materialized must be registered using the
register_listing_table and
register_materialized functions respectively,
otherwise the tables may not be detected by the incremental view maintenance code,
including components such as FileMetadata,
RowMetadataRegistry, or the
mv_dependencies UDTF.
By default, ListingTableLike is implemented for ListingTable,
Modules§
- dependencies
- Track dependencies of materialized data in object storage
- file_
metadata - A virtual table that exposes files in object storage.
- row_
metadata - Pluggable metadata sources for incremental view maintenance
Constants§
- META_
COLUMN - The identifier of the column that
RowMetadataSourceimplementations should store row metadata in.
Traits§
- Listing
Table Like - A
TableProviderwhose data is backed by Hive-partitioned files in object storage. - Materialized
- A hive-partitioned table in object storage that is defined by a user-provided query.
Functions§
- cast_
to_ listing_ table - Attempt to cast the given TableProvider into a
ListingTableLike. If the table’s type has not been registered usingregister_listing_table, will returnNone. - cast_
to_ materialized - Attempt to cast the given TableProvider into a
Materialized. If the table’s type has not been registered usingregister_materialized, will returnNone. - register_
listing_ table - Register a
ListingTableLikeimplementation in this registry. This allowscast_to_listing_tableto easily downcast aTableProviderinto aListingTableLikewhere possible. - register_
materialized - Register a
Materializedimplementation in this registry. This allowscast_to_materializedto easily downcast aTableProviderinto aMaterializedwhere possible.