New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sql: support specifying custom index parameters for geospatial indexes #52800
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for doing this!
Reviewed 10 of 10 files at r1.
Reviewable status: complete! 0 of 0 LGTMs obtained (waiting on @otan)
pkg/sql/create_index.go, line 116 at r1 (raw file):
return a.applyS2ConfigSetting(evalCtx, key, expr, 0, 30) case `s2_level_mod`: return a.applyS2ConfigSetting(evalCtx, key, expr, 1, 30)
s2.RegionCoverer only supports LevelMod from 1...3.
pkg/sql/schemaexpr/partial_index.go, line 174 at r1 (raw file):
if index.GeoConfig.S2Geometry != nil { if len(index.ColumnIDs) != 1 {
why should there be only 1 columnID? The first columnID is the inverted column, but there are also the PK columns.
Release note (sql change): Introduced the `s2_max_level`, `s2_level_mod` and `s2_max_cells` storage parameters for modifying the S2 parameters for indexing GEOMETRY and GEOGRAPHY data types in an inverted index. Release note (sql change): Introduced the `geometry_min_x`, `geometry_min_y`, `geometry_max_x`, `geometry_max_y` storage parameters for indexing GEOMETRY data types in an inverted index.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: complete! 0 of 0 LGTMs obtained (waiting on @sumeerbhola)
pkg/sql/create_index.go, line 116 at r1 (raw file):
Previously, sumeerbhola wrote…
s2.RegionCoverer only supports LevelMod from 1...3.
Fixed.
pkg/sql/schemaexpr/partial_index.go, line 174 at r1 (raw file):
Previously, sumeerbhola wrote…
why should there be only 1 columnID? The first columnID is the inverted column, but there are also the PK columns.
I think this is the way it is stored on the descriptor -- in which case this is the only column.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 2 of 2 files at r2.
Reviewable status: complete! 1 of 0 LGTMs obtained (waiting on @sumeerbhola)
bors r=sumeerbhola |
Build succeeded: |
Release note (sql change): Introduced the
s2_max_level
,s2_level_mod
and
s2_max_cells
storage parameters for modifying the S2 parametersfor indexing GEOMETRY and GEOGRAPHY data types in an inverted index.
Release note (sql change): Introduced the
geometry_min_x
,geometry_min_y
,geometry_max_x
,geometry_max_y
storage parametersfor indexing GEOMETRY data types in an inverted index.