Documentation
¶
Overview ¶
Package partition implements Hive-style partitioning for table data.
Index ¶
- func MatchesFilter(partValues map[string]string, filter map[string]string) bool
- func ParsePartitionPath(path string) (map[string]string, error)
- func SortPartitions(partitions []PartitionInfo)
- func TablePrefix(tableName string) string
- func TimePartitionValues(t time.Time, keys []string) map[string]string
- type PartitionInfo
- type Strategy
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MatchesFilter ¶
MatchesFilter returns true if the partition values match all of the given filter values.
func ParsePartitionPath ¶
ParsePartitionPath extracts partition key-value pairs from a Hive-style path.
func SortPartitions ¶
func SortPartitions(partitions []PartitionInfo)
SortPartitions sorts partition infos by path for deterministic ordering.
func TablePrefix ¶
TablePrefix returns the base path for a table's data files.
Types ¶
type PartitionInfo ¶
PartitionInfo holds information about a single partition.
func PrunePartitions ¶
func PrunePartitions(partitions []PartitionInfo, filter map[string]string) []PartitionInfo
PrunePartitions returns only the partitions that match the filter.
type Strategy ¶
type Strategy struct {
Keys []string // partition key columns, in order
}
Strategy determines how rows are partitioned.
func NewStrategy ¶
NewStrategy creates a partition strategy with the given keys.
Click to show internal directories.
Click to hide internal directories.