File tree Expand file tree Collapse file tree 2 files changed +15
-4
lines changed Expand file tree Collapse file tree 2 files changed +15
-4
lines changed Original file line number Diff line number Diff line change 22import trino
33import argparse
44import sys
5+ import re
56
67if not sys .warnoptions :
78 import warnings
@@ -48,8 +49,11 @@ def run_query(connection, query):
4849 trino_version = run_query (connection , "select node_version from system.runtime.nodes where coordinator = true and state = 'active'" )[0 ][0 ]
4950 print (f"[INFO] Testing against Trino version \" { trino_version } \" " )
5051
51- assert len (trino_version ) >= 3
52- assert trino_version .isnumeric ()
52+ # Strip SDP release suffix from the version string
53+ trino_product_version = re .split (r'-stackable' , trino_version , maxsplit = 1 )[0 ]
54+
55+ assert len (trino_product_version ) >= 3
56+ assert trino_product_version .isnumeric ()
5357 assert trino_version == run_query (connection , "select version()" )[0 ][0 ]
5458
5559 run_query (connection , "CREATE SCHEMA IF NOT EXISTS hive.minio WITH (location = 's3a://trino/')" )
Original file line number Diff line number Diff line change 22import trino
33import argparse
44import sys
5+ import re
56
67if not sys .warnoptions :
78 import warnings
@@ -57,8 +58,14 @@ def run_query(connection, query):
5758 )[0 ][0 ]
5859 print (f'[INFO] Testing against Trino version "{ trino_version } "' )
5960
60- assert len (trino_version ) >= 3
61- assert trino_version .isnumeric ()
61+ # Strip SDP release suffix from the version string
62+ trino_product_version = re .split (r'-stackable' , trino_version , maxsplit = 1 )[0 ]
63+
64+ # Strip SDP release suffix from the version string
65+ trino_product_version = re .split (r'-stackable' , trino_version , maxsplit = 1 )[0 ]
66+
67+ assert len (trino_product_version ) >= 3
68+ assert trino_product_version .isnumeric ()
6269 assert trino_version == run_query (connection , "select version()" )[0 ][0 ]
6370
6471 # WARNING (@NickLarsenNZ): Hard-coded bucket
You can’t perform that action at this time.
0 commit comments