abstract common base of SQL micro-benchmarks to reduce boilerplate and standardize parameters #17383
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
changes:
SqlBenchmarkDatasets
which contains commonly used benchmark data generator schemasSqlBaseBenchmark
which contains common benchmark segment generation methods for any benchmark usingSqlBenchmarkDatasets
SqlBaseQueryBenchmark
andSqlBasePlanBenchmark
for benchmarks measuring queries and planning respectivelySqlBaseQueryBenchmark
, quite dramatically reducing the boilerplate needed to create benchmarks, and allowing the use of multiple datasources within a benchmark fileSqlProjectionsBenchmark
andSqlComplexMetricsColumnsBenchmark
for measuring projections and measuring complex metric compression respectivelyCommon options are:
schemaType
- "explicit" or "auto", to test differences between columns created with explicit dimension schemas vsAutoTypeColumnSchema
that is used by schema discovery (and numbers have indexes and such)storageType
- "MMAP", "INCREMENTAL", "FRAME_COLUMNAR", "FRAME_ROW" for testing various backing "segment" typesstringEncoding
- "UTF8", "FRONT_CODED_DEFAULT_V1", "FRONT_CODED_16_V1", for testing different string encoding strategies (only applies to "MMAP" storageType)complexMetricCompression
- "none", "lz4" for testing different complex metric compression inIndexSpec
(only applies to "MMAP" storageType)Most query benchmarks also have a numbered
query
parameter, the exception beingSqlGroupByBenchmark
which instead has agroupingDimension
parameter.Example: