mirror of
https://github.com/GreptimeTeam/greptimedb.git
synced 2026-10-14 07:52:34 +00:00
fix(perf): omit unsupported float encoding option from baseline setup
Signed-off-by: discord9 <55937128+discord9@users.noreply.github.com>
This commit is contained in:
@@ -21,10 +21,10 @@ chunk_series_count = 128
|
||||
timeout_seconds = 600
|
||||
visibility_timeout_seconds = 300
|
||||
|
||||
# Keep the physical-table definition identical except for float encoding. The
|
||||
# high shared TWCS trigger avoids compaction changing the three-flush layout.
|
||||
# Omit the default encoding from base setup because older binaries do not recognize it.
|
||||
# The high shared TWCS trigger avoids compaction changing the three-flush layout.
|
||||
base_setup_sql = [
|
||||
"CREATE TABLE sst_float_bss_physical (greptime_timestamp TIMESTAMP TIME INDEX, greptime_value DOUBLE) ENGINE=metric WITH ('physical_metric_table'='', 'experimental_sst_float_field_encoding'='default', 'compaction.twcs.trigger_file_num'='100')",
|
||||
"CREATE TABLE sst_float_bss_physical (greptime_timestamp TIMESTAMP TIME INDEX, greptime_value DOUBLE) ENGINE=metric WITH ('physical_metric_table'='', 'compaction.twcs.trigger_file_num'='100')",
|
||||
]
|
||||
candidate_setup_sql = [
|
||||
"CREATE TABLE sst_float_bss_physical (greptime_timestamp TIMESTAMP TIME INDEX, greptime_value DOUBLE) ENGINE=metric WITH ('physical_metric_table'='', 'experimental_sst_float_field_encoding'='byte_stream_split', 'compaction.twcs.trigger_file_num'='100')",
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
"""Coverage for query-regression case group selection."""
|
||||
|
||||
import importlib.util
|
||||
import re
|
||||
import sys
|
||||
import unittest
|
||||
from pathlib import Path
|
||||
@@ -54,6 +55,23 @@ class QueryRegressionCaseSelectionTest(unittest.TestCase):
|
||||
case = "tests/perf/query_cases/sql_topk_order_by/case.toml"
|
||||
self.assertEqual(runner.split_cases([case]), [case])
|
||||
|
||||
def test_sst_float_bss_omits_base_encoding_for_older_binaries(self) -> None:
|
||||
case_path = Path(__file__).parent / "query_cases/sst_float_bss/case.toml"
|
||||
setup_sql = dict(re.findall(
|
||||
r'(base|candidate)_setup_sql = \[\s*"([^"\n]+)"',
|
||||
case_path.read_text(),
|
||||
))
|
||||
base_setup = setup_sql["base"]
|
||||
candidate_setup = setup_sql["candidate"]
|
||||
candidate_option = "'experimental_sst_float_field_encoding'='byte_stream_split'"
|
||||
|
||||
self.assertNotIn("experimental_sst_float_field_encoding", base_setup)
|
||||
self.assertIn(candidate_option, candidate_setup)
|
||||
self.assertEqual(
|
||||
base_setup,
|
||||
candidate_setup.replace(f", {candidate_option}", ""),
|
||||
)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
|
||||
Reference in New Issue
Block a user