docs(parquet-design): specify predicate wire format and enum metrics

Replace opaque Predicate []byte with a tagged (PredicateKind, bytes)
pair, naming Substrait as the canonical v1 format and Iceberg
Expression JSON as a convenience. Replace the free-form Metric string
on VectorQuery with a VectorMetric enum.
This commit is contained in:
Chris Lu
2026-04-25 01:21:11 -07:00
parent 51a209cf60
commit 28c834c76f
+27 -8
View File
@@ -399,24 +399,43 @@ Execution:
```go
type ParquetPushdownRequest struct {
Table string
SnapshotId int64
Files []string
Columns []string
Predicate []byte
VectorQuery *VectorQuery
Limit int
Table string
SnapshotId int64
Files []string
Columns []string
PredicateKind PredicateKind // SUBSTRAIT or ICEBERG_EXPRESSION
Predicate []byte // serialized per PredicateKind
VectorQuery *VectorQuery
Limit int
}
type PredicateKind int32
const (
PredicateUnspecified PredicateKind = 0
PredicateSubstrait PredicateKind = 1 // Substrait ExtendedExpression protobuf
PredicateIceberg PredicateKind = 2 // Iceberg Expression JSON
)
type VectorMetric int32
const (
MetricL2 VectorMetric = 0
MetricCosine VectorMetric = 1
MetricDot VectorMetric = 2
)
type VectorQuery struct {
Column string
Vector []float32
Metric string // l2, cosine, dot
Metric VectorMetric
TopK int
NProbe int
}
```
v1 implementations should accept Substrait as the canonical wire format. Iceberg Expression JSON is supported as a convenience for connectors that already produce it.
### Pushdown Response
```go