Repository navigation
synthetic joined record type planning - #4817
g31pranjal wants to merge 1 commit into
Conversation
048d012 to
e186785
Compare
e186785 to
48bdb3d
Compare
48bdb3d to
9493226
Compare
#4829) `RecordMetaData.getPlannerType` takes record type names and resolves them with `getRecordType`, which only knows stored record types. So the planner cannot describe a synthetic record type. In particular, `IndexExpansionInfo` cannot build the base type of an index defined on one. This adds `getPlannerTypeForRecordType(RecordType)` and `getPlannerTypeForRecordTypes(Collection<RecordType>)`, which describe the record types they are given rather than looking them up by name. The name-taking overloads now resolve their names and delegate to them, so their behaviour is unchanged. `IndexExpansionInfo` passes the indexed record types it already holds. Nothing changes observably yet: indexes on synthetic record types are not offered to the planner. This is groundwork for planning queries against indexes on joined synthetic record types (#4817). `RecordMetaDataPlannerTypeTest` covers three cases: - the new overload describes a joined record type, which the name-taking overload rejects; - for stored types, the new overloads agree with the name-taking ones, including the version pseudo-field when versions are stored; - several types are described by the union of their fields, and a single type exactly as on its own.
9493226 to
472cd8c
Compare
472cd8c to
833e8cf
Compare
…eads all their stored constituents (#4840) `MetaDataPlanContext` never offered indexes on synthetic record types to the planner. Both `forRecordQuery` and `forRootReference` now also offer the readable indexes of every synthetic record type whose stored constituents are all read by the query, found with the new `RecordMetaData.getSyntheticRecordTypesFromRecordTypes(Collection<RecordType>)`. `SyntheticRecordType.getStoredRecordTypes()` gives those constituents: all of a joined type's, only the parent of an unnested type. Outer-joined constituents are still required for now. This changes no plans yet: synthetic primary keys are `ListKeyExpression`s, which index expansion does not support, so such indexes are skipped. It is groundwork for #4817. Tests are in `RecordMetaDataBuilderTest`.
833e8cf to
f593028
Compare
f593028 to
f97cfc9
Compare
📊 Metrics Diff Analysis ReportSummary
ℹ️ About this analysisThis automated analysis compares query planner metrics between the base branch and this PR. It categorizes changes into:
The last category in particular may indicate planner regressions that should be investigated. New QueriesCount of new queries by file:
Only Metrics ChangedThese queries experienced only metrics changes without any plan changes. If these metrics have substantially changed, Total: 2 queries Statistical Summary (Only Metrics Changed)
Significant Regressions (Only Metrics Changed)There were 2 outliers detected. Outlier queries have a significant regression in at least one field. Statistically, this represents either an increase of more than two standard deviations above the mean or a large absolute increase (e.g., 100).
|
No description provided.