OmniSciDB  a667adc9c8
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
com.mapd.parser.extension.ddl.ShowCommandTest Class Reference
+ Inheritance diagram for com.mapd.parser.extension.ddl.ShowCommandTest:
+ Collaboration diagram for com.mapd.parser.extension.ddl.ShowCommandTest:

Public Member Functions

 ShowCommandTest ()
 
void showUserSessions () throws Exception
 
void showTables () throws Exception
 
void showDatabases () throws Exception
 
void showQueries () throws Exception
 
void showTableDetails () throws Exception
 
void showTableDetailsForTables () throws Exception
 
void showDiskCacheUsage () throws Exception
 
void showDiskCacheUsageFor () throws Exception
 
- Public Member Functions inherited from com.mapd.parser.extension.ddl.DDLTest
void setup () throws Exception
 

Additional Inherited Members

- Protected Attributes inherited from com.mapd.parser.extension.ddl.DDLTest
String resourceDirPath
 
String jsonTestDir
 
- Static Protected Attributes inherited from com.mapd.parser.extension.ddl.DDLTest
static final Gson gson = new Gson()
 
- Package Functions inherited from com.mapd.parser.extension.ddl.DDLTest
TPlanResult processDdlCommand (final String ddlCommand) throws Exception
 
JsonObject getJsonFromFile (final String fileName) throws Exception
 

Detailed Description

Definition at line 10 of file ShowCommandTest.java.

Constructor & Destructor Documentation

com.mapd.parser.extension.ddl.ShowCommandTest.ShowCommandTest ( )
inline

Definition at line 11 of file ShowCommandTest.java.

References com.mapd.parser.extension.ddl.DDLTest.jsonTestDir, and com.mapd.parser.extension.ddl.DDLTest.resourceDirPath.

11  {
12  resourceDirPath = ShowCommandTest.class.getClassLoader().getResource("").getPath();
13  jsonTestDir = "showcommands";
14  }

Member Function Documentation

void com.mapd.parser.extension.ddl.ShowCommandTest.showDatabases ( ) throws Exception
inline

Definition at line 35 of file ShowCommandTest.java.

References com.mapd.parser.extension.ddl.DDLTest.getJsonFromFile(), com.mapd.parser.extension.ddl.DDLTest.processDdlCommand(), and run_benchmark_import.result.

35  {
36  final JsonObject expectedJsonObject = getJsonFromFile("show_databases.json");
37  final TPlanResult result = processDdlCommand("SHOW DATABASES;");
38  final JsonObject actualJsonObject =
39  gson.fromJson(result.plan_result, JsonObject.class);
40  assertEquals(expectedJsonObject, actualJsonObject);
41  }
JsonObject getJsonFromFile(final String fileName)
Definition: DDLTest.java:37
TPlanResult processDdlCommand(final String ddlCommand)
Definition: DDLTest.java:32

+ Here is the call graph for this function:

void com.mapd.parser.extension.ddl.ShowCommandTest.showDiskCacheUsage ( ) throws Exception
inline

Definition at line 73 of file ShowCommandTest.java.

References com.mapd.parser.extension.ddl.DDLTest.getJsonFromFile(), com.mapd.parser.extension.ddl.DDLTest.processDdlCommand(), and run_benchmark_import.result.

73  {
74  final JsonObject expectedJsonObject = getJsonFromFile("show_disk_cache_usage.json");
75  final TPlanResult result = processDdlCommand("SHOW DISK CACHE USAGE;");
76  final JsonObject actualJsonObject =
77  gson.fromJson(result.plan_result, JsonObject.class);
78  assertEquals(expectedJsonObject, actualJsonObject);
79  }
JsonObject getJsonFromFile(final String fileName)
Definition: DDLTest.java:37
TPlanResult processDdlCommand(final String ddlCommand)
Definition: DDLTest.java:32

+ Here is the call graph for this function:

void com.mapd.parser.extension.ddl.ShowCommandTest.showDiskCacheUsageFor ( ) throws Exception
inline

Definition at line 82 of file ShowCommandTest.java.

References com.mapd.parser.extension.ddl.DDLTest.getJsonFromFile(), com.mapd.parser.extension.ddl.DDLTest.processDdlCommand(), and run_benchmark_import.result.

82  {
83  final JsonObject expectedJsonObject =
84  getJsonFromFile("show_disk_cache_usage_for.json");
85  final TPlanResult result = processDdlCommand("SHOW DISK CACHE USAGE table1, table2;");
86  final JsonObject actualJsonObject =
87  gson.fromJson(result.plan_result, JsonObject.class);
88  assertEquals(expectedJsonObject, actualJsonObject);
89  }
JsonObject getJsonFromFile(final String fileName)
Definition: DDLTest.java:37
TPlanResult processDdlCommand(final String ddlCommand)
Definition: DDLTest.java:32

+ Here is the call graph for this function:

void com.mapd.parser.extension.ddl.ShowCommandTest.showQueries ( ) throws Exception
inline

Definition at line 44 of file ShowCommandTest.java.

References com.mapd.parser.extension.ddl.DDLTest.getJsonFromFile(), com.mapd.parser.extension.ddl.DDLTest.processDdlCommand(), and run_benchmark_import.result.

44  {
45  final JsonObject expectedJsonObject = getJsonFromFile("show_queries.json");
46  final TPlanResult result = processDdlCommand("SHOW QUERIES;");
47  final JsonObject actualJsonObject =
48  gson.fromJson(result.plan_result, JsonObject.class);
49  assertEquals(expectedJsonObject, actualJsonObject);
50  }
JsonObject getJsonFromFile(final String fileName)
Definition: DDLTest.java:37
TPlanResult processDdlCommand(final String ddlCommand)
Definition: DDLTest.java:32

+ Here is the call graph for this function:

void com.mapd.parser.extension.ddl.ShowCommandTest.showTableDetails ( ) throws Exception
inline

Definition at line 53 of file ShowCommandTest.java.

References com.mapd.parser.extension.ddl.DDLTest.getJsonFromFile(), com.mapd.parser.extension.ddl.DDLTest.processDdlCommand(), and run_benchmark_import.result.

53  {
54  final JsonObject expectedJsonObject = getJsonFromFile("show_table_details.json");
55  final TPlanResult result = processDdlCommand("SHOW TABLE DETAILS;");
56  final JsonObject actualJsonObject =
57  gson.fromJson(result.plan_result, JsonObject.class);
58  assertEquals(expectedJsonObject, actualJsonObject);
59  }
JsonObject getJsonFromFile(final String fileName)
Definition: DDLTest.java:37
TPlanResult processDdlCommand(final String ddlCommand)
Definition: DDLTest.java:32

+ Here is the call graph for this function:

void com.mapd.parser.extension.ddl.ShowCommandTest.showTableDetailsForTables ( ) throws Exception
inline

Definition at line 62 of file ShowCommandTest.java.

References com.mapd.parser.extension.ddl.DDLTest.getJsonFromFile(), com.mapd.parser.extension.ddl.DDLTest.processDdlCommand(), and run_benchmark_import.result.

62  {
63  final JsonObject expectedJsonObject =
64  getJsonFromFile("show_table_details_for_tables.json");
65  final TPlanResult result =
66  processDdlCommand("SHOW TABLE DETAILS test_table_1, test_table_2;");
67  final JsonObject actualJsonObject =
68  gson.fromJson(result.plan_result, JsonObject.class);
69  assertEquals(expectedJsonObject, actualJsonObject);
70  }
JsonObject getJsonFromFile(final String fileName)
Definition: DDLTest.java:37
TPlanResult processDdlCommand(final String ddlCommand)
Definition: DDLTest.java:32

+ Here is the call graph for this function:

void com.mapd.parser.extension.ddl.ShowCommandTest.showTables ( ) throws Exception
inline

Definition at line 26 of file ShowCommandTest.java.

References com.mapd.parser.extension.ddl.DDLTest.getJsonFromFile(), com.mapd.parser.extension.ddl.DDLTest.processDdlCommand(), and run_benchmark_import.result.

26  {
27  final JsonObject expectedJsonObject = getJsonFromFile("show_tables.json");
28  final TPlanResult result = processDdlCommand("SHOW TABLES;");
29  final JsonObject actualJsonObject =
30  gson.fromJson(result.plan_result, JsonObject.class);
31  assertEquals(expectedJsonObject, actualJsonObject);
32  }
JsonObject getJsonFromFile(final String fileName)
Definition: DDLTest.java:37
TPlanResult processDdlCommand(final String ddlCommand)
Definition: DDLTest.java:32

+ Here is the call graph for this function:

void com.mapd.parser.extension.ddl.ShowCommandTest.showUserSessions ( ) throws Exception
inline

Definition at line 17 of file ShowCommandTest.java.

References com.mapd.parser.extension.ddl.DDLTest.getJsonFromFile(), com.mapd.parser.extension.ddl.DDLTest.processDdlCommand(), and run_benchmark_import.result.

17  {
18  final JsonObject expectedJsonObject = getJsonFromFile("show_user_sessions.json");
19  final TPlanResult result = processDdlCommand("SHOW USER SESSIONS;");
20  final JsonObject actualJsonObject =
21  gson.fromJson(result.plan_result, JsonObject.class);
22  assertEquals(expectedJsonObject, actualJsonObject);
23  }
JsonObject getJsonFromFile(final String fileName)
Definition: DDLTest.java:37
TPlanResult processDdlCommand(final String ddlCommand)
Definition: DDLTest.java:32

+ Here is the call graph for this function:


The documentation for this class was generated from the following file: