1 package com.mapd.parser.extension.ddl;
3 import static org.junit.Assert.assertEquals;
5 import com.google.gson.JsonObject;
9 import ai.heavy.thrift.calciteserver.TPlanResult;
13 resourceDirPath = ShowCommandTest.class.getClassLoader().getResource(
"").getPath();
19 final JsonObject expectedJsonObject =
getJsonFromFile(
"show_user_sessions.json");
21 final JsonObject actualJsonObject =
22 gson.fromJson(result.plan_result, JsonObject.class);
23 assertEquals(expectedJsonObject, actualJsonObject);
28 final JsonObject expectedJsonObject =
getJsonFromFile(
"show_user_details.json");
30 final JsonObject actualJsonObject =
31 gson.fromJson(result.plan_result, JsonObject.class);
32 assertEquals(expectedJsonObject, actualJsonObject);
37 final JsonObject expectedJsonObject =
41 final JsonObject actualJsonObject =
42 gson.fromJson(result.plan_result, JsonObject.class);
43 assertEquals(expectedJsonObject, actualJsonObject);
48 final JsonObject expectedJsonObject =
getJsonFromFile(
"show_all_user_details.json");
50 final JsonObject actualJsonObject =
51 gson.fromJson(result.plan_result, JsonObject.class);
52 assertEquals(expectedJsonObject, actualJsonObject);
57 final JsonObject expectedJsonObject =
61 final JsonObject actualJsonObject =
62 gson.fromJson(result.plan_result, JsonObject.class);
63 assertEquals(expectedJsonObject, actualJsonObject);
68 final JsonObject expectedJsonObject =
getJsonFromFile(
"show_tables.json");
70 final JsonObject actualJsonObject =
71 gson.fromJson(result.plan_result, JsonObject.class);
72 assertEquals(expectedJsonObject, actualJsonObject);
77 final JsonObject expectedJsonObject =
getJsonFromFile(
"show_databases.json");
79 final JsonObject actualJsonObject =
80 gson.fromJson(result.plan_result, JsonObject.class);
81 assertEquals(expectedJsonObject, actualJsonObject);
86 final JsonObject expectedJsonObject =
getJsonFromFile(
"show_queries.json");
88 final JsonObject actualJsonObject =
89 gson.fromJson(result.plan_result, JsonObject.class);
90 assertEquals(expectedJsonObject, actualJsonObject);
95 final JsonObject expectedJsonObject =
getJsonFromFile(
"show_table_details.json");
97 final JsonObject actualJsonObject =
98 gson.fromJson(result.plan_result, JsonObject.class);
99 assertEquals(expectedJsonObject, actualJsonObject);
104 final JsonObject expectedJsonObject =
106 final TPlanResult
result =
108 final JsonObject actualJsonObject =
109 gson.fromJson(result.plan_result, JsonObject.class);
110 assertEquals(expectedJsonObject, actualJsonObject);
115 final JsonObject expectedJsonObject =
getJsonFromFile(
"show_disk_cache_usage.json");
117 final JsonObject actualJsonObject =
118 gson.fromJson(result.plan_result, JsonObject.class);
119 assertEquals(expectedJsonObject, actualJsonObject);
124 final JsonObject expectedJsonObject =
127 final JsonObject actualJsonObject =
128 gson.fromJson(result.plan_result, JsonObject.class);
129 assertEquals(expectedJsonObject, actualJsonObject);
134 final JsonObject expectedJsonObject =
getJsonFromFile(
"show_data_sources.json");
136 final JsonObject actualJsonObject =
137 gson.fromJson(result.plan_result, JsonObject.class);
138 assertEquals(expectedJsonObject, actualJsonObject);
JsonObject getJsonFromFile(final String fileName)
void showTableDetailsForTables()
void showAllUserDetails()
void showUserDetailsForUser()
void showAllUserDetailsForUser()
TPlanResult processDdlCommand(final String ddlCommand)
void showDiskCacheUsage()
void showDiskCacheUsageFor()
void showSupportedDataSources()