Skip to content

Commit 719068d

Browse files
committed
Add hive catalog for versions pre 458
1 parent fe4ab99 commit 719068d

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
connector.name=hive
2+
hive.metastore=file
3+
hive.metastore.catalog.dir=/tmp/metastore
4+
hive.security=sql-standard

trino/integration_test.go

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,8 +144,12 @@ func TestMain(m *testing.M) {
144144
wd + "/etc/password-authenticator.properties:/etc/trino/password-authenticator.properties",
145145
}
146146

147+
version, err := strconv.Atoi(*trinoImageTagFlag)
148+
if (err != nil && *trinoImageTagFlag != "latest") || (err == nil && version < 458) {
149+
mounts = append(mounts, wd+"/etc/catalog/hive-pre-458version.properties:/etc/trino/catalog/hive.properties")
150+
}
151+
147152
if spoolingProtocolSupported {
148-
version, err := strconv.Atoi(*trinoImageTagFlag)
149153
if (err != nil && *trinoImageTagFlag != "latest") || (err == nil && version < 477) {
150154
mounts = append(mounts, wd+"/etc/config-pre-477version.properties:/etc/trino/config.properties")
151155
} else {
@@ -185,7 +189,7 @@ func TestMain(m *testing.M) {
185189

186190
err = grantAdminRoleToTestUser()
187191
if err != nil {
188-
log.Printf("Warning: Failed to grant admin role to test user: %s", err)
192+
log.Fatalf("Warning: Failed to grant admin role to test user: %s", err)
189193
}
190194

191195
*integrationServerFlag = "http://test@localhost:" + trinoResource.GetPort("8080/tcp")

0 commit comments

Comments
 (0)