OmniSciDB  72c90bc290
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups 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 showUserDetails () throws Exception
 
void showUserDetailsForUser () throws Exception
 
void showAllUserDetails () throws Exception
 
void showAllUserDetailsForUser () 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
 
void showSupportedDataSources () 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 11 of file ShowCommandTest.java.

Constructor & Destructor Documentation

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

Definition at line 12 of file ShowCommandTest.java.

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

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

Member Function Documentation

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

Definition at line 47 of file ShowCommandTest.java.

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

47  {
48  final JsonObject expectedJsonObject = getJsonFromFile("show_all_user_details.json");
49  final TPlanResult result = processDdlCommand("SHOW ALL USER DETAILS;");
50  final JsonObject actualJsonObject =
51  gson.fromJson(result.plan_result, JsonObject.class);
52  assertEquals(expectedJsonObject, actualJsonObject);
53  }
JsonObject getJsonFromFile(final String fileName)
Definition: DDLTest.java:51
TPlanResult processDdlCommand(final String ddlCommand)
Definition: DDLTest.java:35

+ Here is the call graph for this function:

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

Definition at line 56 of file ShowCommandTest.java.

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

56  {
57  final JsonObject expectedJsonObject =
58  getJsonFromFile("show_all_user_details_for_user.json");
59  final TPlanResult result =
60  processDdlCommand("SHOW ALL USER DETAILS test_user1, test_user2;");
61  final JsonObject actualJsonObject =
62  gson.fromJson(result.plan_result, JsonObject.class);
63  assertEquals(expectedJsonObject, actualJsonObject);
64  }
JsonObject getJsonFromFile(final String fileName)
Definition: DDLTest.java:51
TPlanResult processDdlCommand(final String ddlCommand)
Definition: DDLTest.java:35

+ Here is the call graph for this function:

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

Definition at line 76 of file ShowCommandTest.java.

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

76  {
77  final JsonObject expectedJsonObject = getJsonFromFile("show_databases.json");
78  final TPlanResult result = processDdlCommand("SHOW DATABASES;");
79  final JsonObject actualJsonObject =
80  gson.fromJson(result.plan_result, JsonObject.class);
81  assertEquals(expectedJsonObject, actualJsonObject);
82  }
JsonObject getJsonFromFile(final String fileName)
Definition: DDLTest.java:51
TPlanResult processDdlCommand(final String ddlCommand)
Definition: DDLTest.java:35

+ Here is the call graph for this function:

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

Definition at line 114 of file ShowCommandTest.java.

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

114  {
115  final JsonObject expectedJsonObject = getJsonFromFile("show_disk_cache_usage.json");
116  final TPlanResult result = processDdlCommand("SHOW DISK CACHE USAGE;");
117  final JsonObject actualJsonObject =
118  gson.fromJson(result.plan_result, JsonObject.class);
119  assertEquals(expectedJsonObject, actualJsonObject);
120  }
JsonObject getJsonFromFile(final String fileName)
Definition: DDLTest.java:51
TPlanResult processDdlCommand(final String ddlCommand)
Definition: DDLTest.java:35

+ Here is the call graph for this function:

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

Definition at line 123 of file ShowCommandTest.java.

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

123  {
124  final JsonObject expectedJsonObject =
125  getJsonFromFile("show_disk_cache_usage_for.json");
126  final TPlanResult result = processDdlCommand("SHOW DISK CACHE USAGE table1, table2;");
127  final JsonObject actualJsonObject =
128  gson.fromJson(result.plan_result, JsonObject.class);
129  assertEquals(expectedJsonObject, actualJsonObject);
130  }
JsonObject getJsonFromFile(final String fileName)
Definition: DDLTest.java:51
TPlanResult processDdlCommand(final String ddlCommand)
Definition: DDLTest.java:35

+ Here is the call graph for this function:

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

Definition at line 85 of file ShowCommandTest.java.

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

85  {
86  final JsonObject expectedJsonObject = getJsonFromFile("show_queries.json");
87  final TPlanResult result = processDdlCommand("SHOW QUERIES;");
88  final JsonObject actualJsonObject =
89  gson.fromJson(result.plan_result, JsonObject.class);
90  assertEquals(expectedJsonObject, actualJsonObject);
91  }
JsonObject getJsonFromFile(final String fileName)
Definition: DDLTest.java:51
TPlanResult processDdlCommand(final String ddlCommand)
Definition: DDLTest.java:35

+ Here is the call graph for this function:

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

Definition at line 133 of file ShowCommandTest.java.

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

133  {
134  final JsonObject expectedJsonObject = getJsonFromFile("show_data_sources.json");
135  final TPlanResult result = processDdlCommand("SHOW SUPPORTED DATA SOURCES;");
136  final JsonObject actualJsonObject =
137  gson.fromJson(result.plan_result, JsonObject.class);
138  assertEquals(expectedJsonObject, actualJsonObject);
139  }
JsonObject getJsonFromFile(final String fileName)
Definition: DDLTest.java:51
TPlanResult processDdlCommand(final String ddlCommand)
Definition: DDLTest.java:35

+ Here is the call graph for this function:

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

Definition at line 94 of file ShowCommandTest.java.

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

94  {
95  final JsonObject expectedJsonObject = getJsonFromFile("show_table_details.json");
96  final TPlanResult result = processDdlCommand("SHOW TABLE DETAILS;");
97  final JsonObject actualJsonObject =
98  gson.fromJson(result.plan_result, JsonObject.class);
99  assertEquals(expectedJsonObject, actualJsonObject);
100  }
JsonObject getJsonFromFile(final String fileName)
Definition: DDLTest.java:51
TPlanResult processDdlCommand(final String ddlCommand)
Definition: DDLTest.java:35

+ Here is the call graph for this function:

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

Definition at line 103 of file ShowCommandTest.java.

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

103  {
104  final JsonObject expectedJsonObject =
105  getJsonFromFile("show_table_details_for_tables.json");
106  final TPlanResult result =
107  processDdlCommand("SHOW TABLE DETAILS test_table_1, test_table_2;");
108  final JsonObject actualJsonObject =
109  gson.fromJson(result.plan_result, JsonObject.class);
110  assertEquals(expectedJsonObject, actualJsonObject);
111  }
JsonObject getJsonFromFile(final String fileName)
Definition: DDLTest.java:51
TPlanResult processDdlCommand(final String ddlCommand)
Definition: DDLTest.java:35

+ Here is the call graph for this function:

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

Definition at line 67 of file ShowCommandTest.java.

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

67  {
68  final JsonObject expectedJsonObject = getJsonFromFile("show_tables.json");
69  final TPlanResult result = processDdlCommand("SHOW TABLES;");
70  final JsonObject actualJsonObject =
71  gson.fromJson(result.plan_result, JsonObject.class);
72  assertEquals(expectedJsonObject, actualJsonObject);
73  }
JsonObject getJsonFromFile(final String fileName)
Definition: DDLTest.java:51
TPlanResult processDdlCommand(final String ddlCommand)
Definition: DDLTest.java:35

+ Here is the call graph for this function:

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

Definition at line 27 of file ShowCommandTest.java.

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

27  {
28  final JsonObject expectedJsonObject = getJsonFromFile("show_user_details.json");
29  final TPlanResult result = processDdlCommand("SHOW USER DETAILS;");
30  final JsonObject actualJsonObject =
31  gson.fromJson(result.plan_result, JsonObject.class);
32  assertEquals(expectedJsonObject, actualJsonObject);
33  }
JsonObject getJsonFromFile(final String fileName)
Definition: DDLTest.java:51
TPlanResult processDdlCommand(final String ddlCommand)
Definition: DDLTest.java:35

+ Here is the call graph for this function:

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

Definition at line 36 of file ShowCommandTest.java.

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

36  {
37  final JsonObject expectedJsonObject =
38  getJsonFromFile("show_user_details_for_user.json");
39  final TPlanResult result =
40  processDdlCommand("SHOW USER DETAILS test_user1, test_user2;");
41  final JsonObject actualJsonObject =
42  gson.fromJson(result.plan_result, JsonObject.class);
43  assertEquals(expectedJsonObject, actualJsonObject);
44  }
JsonObject getJsonFromFile(final String fileName)
Definition: DDLTest.java:51
TPlanResult processDdlCommand(final String ddlCommand)
Definition: DDLTest.java:35

+ Here is the call graph for this function:

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

Definition at line 18 of file ShowCommandTest.java.

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

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

+ Here is the call graph for this function:


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