Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
pan3793 committed Nov 23, 2023
1 parent 13eb76d commit 847e39e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -229,14 +229,16 @@ trait HiveEngineTests extends HiveJDBCTestHelper {
assume(SystemUtils.isJavaVersionAtMost(JavaVersion.JAVA_1_8))
withJdbcStatement() { statement =>
val resultSet = statement.getConnection.getMetaData.getTableTypes
val expected = Set("TABLE", "VIEW", "MATERIALIZED_VIEW")
// Hive3 removes support for INDEX_TABLE
val expected = Set("TABLE", "VIEW", "MATERIALIZED_VIEW", "INDEX_TABLE")
var tableTypes = Set[String]()
while (resultSet.next()) {
assert(expected.contains(resultSet.getString(TABLE_TYPE)))
tableTypes += resultSet.getString(TABLE_TYPE)
}
assert(!resultSet.next())
assert(expected.size === tableTypes.size)
// Hive3 removes support for INDEX_TABLE
assert(expected.dropWhile(_ == "INDEX_TABLE").size === tableTypes.size)
}
}

Expand Down Expand Up @@ -387,10 +389,12 @@ trait HiveEngineTests extends HiveJDBCTestHelper {
assert(typeInfo.getInt(DATA_TYPE) === java.sql.Types.TIMESTAMP)

typeInfo.next()
assert(typeInfo.getString(TYPE_NAME) === "TIMESTAMP WITH LOCAL TIME ZONE")
assert(typeInfo.getInt(DATA_TYPE) === java.sql.Types.OTHER)
// Hive3 supports TIMESTAMP WITH LOCAL TIME ZONE
if (typeInfo.getString(TYPE_NAME) === "TIMESTAMP WITH LOCAL TIME ZONE") {
assert(typeInfo.getInt(DATA_TYPE) === java.sql.Types.OTHER)
typeInfo.next()
}

typeInfo.next()
assert(typeInfo.getString(TYPE_NAME) === "INTERVAL_YEAR_MONTH")
assert(typeInfo.getInt(DATA_TYPE) === java.sql.Types.OTHER)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ class HiveProcessBuilderSuite extends KyuubiFunSuite {
}
val commands = builder.toString.split('\n')
assert(commands.head.endsWith("bin/java"), "wrong exec")
assert(builder.toString.contains("--conf\nkyuubi.session.user=kyuubi"))
assert(builder.toString.contains("--conf kyuubi.session.user=kyuubi"))
assert(commands.exists(ss => ss.contains("kyuubi-hive-sql-engine")), "wrong classpath")
assert(builder.toString.contains("--conf\nkyuubi.on=off"))
assert(builder.toString.contains("--conf kyuubi.on=off"))
}

test("default engine memory") {
Expand Down

0 comments on commit 847e39e

Please sign in to comment.