Skip to content

Commit

Permalink
[regression-test](framework) fix sql_return_maparray not use alias bug (
Browse files Browse the repository at this point in the history
  • Loading branch information
shuke987 committed Jan 17, 2025
1 parent 6b13dd5 commit c0eede9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -459,7 +459,7 @@ class Suite implements GroovyInterceptable {
// get all column names as list
List<String> columnNames = new ArrayList<>()
for (int i = 0; i < meta.getColumnCount(); i++) {
columnNames.add(meta.getColumnName(i + 1))
columnNames.add(meta.getColumnLabel(i + 1))
}

// add result to res map list, each row is a map with key is column name
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -504,6 +504,12 @@ suite('test_manager_interface_1',"p0") {
futures.add( thread {
sleep(1500)

result = sql """
select a.*, b.*, c.NAME as WORKLOAD_GROUP_NAME from information_schema.active_queries a left join
information_schema.backend_active_tasks b on a.QUERY_ID = b.QUERY_ID left join information_schema.workload_groups c on a.WORKLOAD_GROUP_ID = c.ID
"""
logger.info("result = ${result}")

result = sql_return_maparray """
select a.*, b.*, c.NAME as WORKLOAD_GROUP_NAME from information_schema.active_queries a left join
information_schema.backend_active_tasks b on a.QUERY_ID = b.QUERY_ID left join information_schema.workload_groups c on a.WORKLOAD_GROUP_ID = c.ID
Expand All @@ -527,7 +533,7 @@ suite('test_manager_interface_1',"p0") {
assertTrue(result[i]["SHUFFLE_SEND_BYTES"].toBigInteger() ==0) // SHUFFLE_SEND_BYTES
assertTrue(result[i]["SHUFFLE_SEND_ROWS"].toBigInteger() ==0) // SHUFFLE_SEND_ROWS
assertTrue(result[i]["CURRENT_USED_MEMORY_BYTES"]!=null) // CURRENT_USED_MEMORY_BYTES
assertTrue(result[i]["WORKLOAD_GROUP_ID"]!=null) // WORKLOAD_GROUP_NAME
assertTrue(result[i]["WORKLOAD_GROUP_NAME"]!=null) // WORKLOAD_GROUP_NAME
}
}
assertTrue(x == 1)
Expand Down

0 comments on commit c0eede9

Please sign in to comment.