File tree Expand file tree Collapse file tree 2 files changed +12
-4
lines changed Expand file tree Collapse file tree 2 files changed +12
-4
lines changed Original file line number Diff line number Diff line change 2
2
import trino
3
3
import argparse
4
4
import sys
5
+ import re
5
6
6
7
if not sys .warnoptions :
7
8
import warnings
@@ -48,8 +49,11 @@ def run_query(connection, query):
48
49
trino_version = run_query (connection , "select node_version from system.runtime.nodes where coordinator = true and state = 'active'" )[0 ][0 ]
49
50
print (f"[INFO] Testing against Trino version \" { trino_version } \" " )
50
51
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 ()
53
57
assert trino_version == run_query (connection , "select version()" )[0 ][0 ]
54
58
55
59
run_query (connection , "CREATE SCHEMA IF NOT EXISTS hive.minio WITH (location = 's3a://trino/')" )
Original file line number Diff line number Diff line change 2
2
import trino
3
3
import argparse
4
4
import sys
5
+ import re
5
6
6
7
if not sys .warnoptions :
7
8
import warnings
@@ -57,8 +58,11 @@ def run_query(connection, query):
57
58
)[0 ][0 ]
58
59
print (f'[INFO] Testing against Trino version "{ trino_version } "' )
59
60
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
+ assert len (trino_product_version ) >= 3
65
+ assert trino_product_version .isnumeric ()
62
66
assert trino_version == run_query (connection , "select version()" )[0 ][0 ]
63
67
64
68
# WARNING (@NickLarsenNZ): Hard-coded bucket
You can’t perform that action at this time.
0 commit comments