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

Public Member Functions

void setup () throws Exception
 

Protected Attributes

String resourceDirPath
 
String jsonTestDir
 

Static Protected Attributes

static final Gson gson = new Gson()
 

Package Functions

TPlanResult processDdlCommand (final String ddlCommand) throws Exception
 
JsonObject getJsonFromFile (final String fileName) throws Exception
 

Private Attributes

CalciteServerHandler calciteServerHandler
 

Detailed Description

Definition at line 20 of file DDLTest.java.

Member Function Documentation

JsonObject com.mapd.parser.extension.ddl.DDLTest.getJsonFromFile ( final String  fileName) throws Exception
inlinepackage

Definition at line 51 of file DDLTest.java.

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

Referenced by com.mapd.parser.extension.ddl.AlterDatabaseTest.AlterDatabaseChangeOwner(), com.mapd.parser.extension.ddl.AlterDatabaseTest.AlterDatabaseRename(), com.mapd.parser.extension.ddl.ForeignTableTest.alterForeignTableRenameColumn(), com.mapd.parser.extension.ddl.ForeignTableTest.alterForeignTableRenameTable(), com.mapd.parser.extension.ddl.ForeignTableTest.alterForeignTableSetOptions(), com.mapd.parser.extension.ddl.ForeignServerTest.AlterServerChangeOwner(), com.mapd.parser.extension.ddl.ForeignServerTest.AlterServerRenameServer(), com.mapd.parser.extension.ddl.ForeignServerTest.AlterServerSetDataWrapper(), com.mapd.parser.extension.ddl.ForeignServerTest.AlterServerSetOptions(), com.mapd.parser.extension.ddl.InterruptCommandTest.alterSessionSetExecutor_cpu(), com.mapd.parser.extension.ddl.InterruptCommandTest.alterSessionSetExecutor_gpu(), com.mapd.parser.extension.ddl.InterruptCommandTest.alterSystemClear_cpu(), com.mapd.parser.extension.ddl.InterruptCommandTest.alterSystemClear_gpu(), com.mapd.parser.extension.ddl.InterruptCommandTest.alterSystemClear_render(), com.mapd.parser.extension.ddl.AlterTableTest.AlterTableAlterColumn(), com.mapd.parser.extension.ddl.ForeignTableTest.createForeignTableArraySized(), com.mapd.parser.extension.ddl.ForeignTableTest.createForeignTableArrayUnsized(), com.mapd.parser.extension.ddl.ForeignTableTest.createForeignTableBigInt(), com.mapd.parser.extension.ddl.ForeignTableTest.createForeignTableBoolean(), com.mapd.parser.extension.ddl.ForeignTableTest.createForeignTableColOptions(), com.mapd.parser.extension.ddl.ForeignTableTest.createForeignTableDate(), com.mapd.parser.extension.ddl.ForeignTableTest.createForeignTableDecimal(), com.mapd.parser.extension.ddl.ForeignTableTest.createForeignTableDouble(), com.mapd.parser.extension.ddl.ForeignTableTest.createForeignTableDoubleDecimal(), com.mapd.parser.extension.ddl.ForeignTableTest.createForeignTableEncodingCompressed(), com.mapd.parser.extension.ddl.ForeignTableTest.createForeignTableEncodingCompressed32(), com.mapd.parser.extension.ddl.ForeignTableTest.createForeignTableEncodingDays1(), com.mapd.parser.extension.ddl.ForeignTableTest.createForeignTableEncodingDict(), com.mapd.parser.extension.ddl.ForeignTableTest.createForeignTableEncodingDict8(), com.mapd.parser.extension.ddl.ForeignTableTest.createForeignTableEncodingFixed1(), com.mapd.parser.extension.ddl.ForeignTableTest.createForeignTableEncodingNone(), com.mapd.parser.extension.ddl.ForeignTableTest.createForeignTableEpoch(), com.mapd.parser.extension.ddl.ForeignTableTest.createForeignTableEscapeOption(), com.mapd.parser.extension.ddl.ForeignTableTest.createForeignTableFloat(), com.mapd.parser.extension.ddl.ForeignTableTest.createForeignTableGeoPoint(), com.mapd.parser.extension.ddl.ForeignTableTest.createForeignTableGeoPointMerc(), com.mapd.parser.extension.ddl.ForeignTableTest.createForeignTableGeoPointWG(), com.mapd.parser.extension.ddl.ForeignTableTest.createForeignTableIfNotExists(), com.mapd.parser.extension.ddl.ForeignTableTest.createForeignTableLinestring(), com.mapd.parser.extension.ddl.ForeignTableTest.createForeignTableMultiLinestring(), com.mapd.parser.extension.ddl.ForeignTableTest.createForeignTableMultiPoint(), com.mapd.parser.extension.ddl.ForeignTableTest.createForeignTableMultiPolygon(), com.mapd.parser.extension.ddl.ForeignTableTest.createForeignTableNotNull(), com.mapd.parser.extension.ddl.ForeignTableTest.createForeignTableOneCol(), com.mapd.parser.extension.ddl.ForeignTableTest.createForeignTableOptions(), com.mapd.parser.extension.ddl.ForeignTableTest.createForeignTablePoint(), com.mapd.parser.extension.ddl.ForeignTableTest.createForeignTablePointCompressed(), com.mapd.parser.extension.ddl.ForeignTableTest.createForeignTablePolygon(), com.mapd.parser.extension.ddl.ForeignTableTest.createForeignTableSchema(), com.mapd.parser.extension.ddl.ForeignTableTest.createForeignTableSmallInt(), com.mapd.parser.extension.ddl.ForeignTableTest.createForeignTableTime(), com.mapd.parser.extension.ddl.ForeignTableTest.createForeignTableTimestamp(), com.mapd.parser.extension.ddl.ForeignTableTest.createForeignTableTinyInt(), com.mapd.parser.extension.ddl.ForeignTableTest.createForeignTableTwoCol(), com.mapd.parser.extension.ddl.ForeignServerTest.CreateServerDdlCommand(), com.mapd.parser.extension.ddl.ForeignServerTest.CreateServerDdlCommandWithIfNotExists(), com.mapd.parser.extension.ddl.UserMappingTest.createUserMapping(), com.mapd.parser.extension.ddl.UserMappingTest.createUserMappingForCurrentUser(), com.mapd.parser.extension.ddl.UserMappingTest.createUserMappingForPublicUser(), com.mapd.parser.extension.ddl.UserMappingTest.createUserMappingWithIfNotExists(), com.mapd.parser.extension.ddl.ForeignTableTest.dropForeignTable(), com.mapd.parser.extension.ddl.ForeignTableTest.dropForeignTableIfExists(), com.mapd.parser.extension.ddl.ForeignServerTest.DropServerDdlCommand(), com.mapd.parser.extension.ddl.ForeignServerTest.DropServerDdlCommandWithIfExists(), com.mapd.parser.extension.ddl.UserMappingTest.dropUserMapping(), com.mapd.parser.extension.ddl.UserMappingTest.dropUserMappingWithIfExists(), com.mapd.parser.extension.ddl.InsertValuesTest.insertValues(), com.mapd.parser.extension.ddl.InterruptCommandTest.killQuery(), com.mapd.parser.extension.ddl.ReassignOwnedTest.reassignAllOwned(), com.mapd.parser.extension.ddl.ReassignOwnedTest.reassignOwned(), com.mapd.parser.extension.ddl.ForeignTableTest.refresh_foreign_table(), com.mapd.parser.extension.ddl.ForeignTableTest.refresh_foreign_table_with_evict(), com.mapd.parser.extension.ddl.ForeignTableTest.refresh_foreign_tables(), com.mapd.parser.extension.ddl.ShowCommandTest.showAllUserDetails(), com.mapd.parser.extension.ddl.ShowCommandTest.showAllUserDetailsForUser(), com.mapd.parser.extension.ddl.ShowCommandTest.showDatabases(), com.mapd.parser.extension.ddl.ShowCommandTest.showDiskCacheUsage(), com.mapd.parser.extension.ddl.ShowCommandTest.showDiskCacheUsageFor(), com.mapd.parser.extension.ddl.ForeignServerTest.ShowForeignServers(), com.mapd.parser.extension.ddl.ForeignServerTest.ShowForeignServersEqOr(), com.mapd.parser.extension.ddl.ForeignServerTest.ShowForeignServersLike(), com.mapd.parser.extension.ddl.ForeignServerTest.ShowForeignServersLikeAnd(), com.mapd.parser.extension.ddl.ForeignServerTest.ShowForeignServersLikeAndLikeOrEq(), com.mapd.parser.extension.ddl.ForeignServerTest.ShowForeignServersWhere(), com.mapd.parser.extension.ddl.ShowCommandTest.showQueries(), com.mapd.parser.extension.ddl.ShowCommandTest.showSupportedDataSources(), com.mapd.parser.extension.ddl.ShowCommandTest.showTableDetails(), com.mapd.parser.extension.ddl.ShowCommandTest.showTableDetailsForTables(), com.mapd.parser.extension.ddl.ShowCommandTest.showTables(), com.mapd.parser.extension.ddl.ShowCommandTest.showUserDetails(), com.mapd.parser.extension.ddl.ShowCommandTest.showUserDetailsForUser(), and com.mapd.parser.extension.ddl.ShowCommandTest.showUserSessions().

51  {
52  final String filePath = resourceDirPath + "json/ddl/" + jsonTestDir + "/" + fileName;
53  return gson.fromJson(new FileReader(filePath), JsonObject.class);
54  }
TPlanResult com.mapd.parser.extension.ddl.DDLTest.processDdlCommand ( final String  ddlCommand) throws Exception
inlinepackage

Definition at line 35 of file DDLTest.java.

Referenced by com.mapd.parser.extension.ddl.AlterDatabaseTest.AlterDatabaseChangeOwner(), com.mapd.parser.extension.ddl.AlterDatabaseTest.AlterDatabaseRename(), com.mapd.parser.extension.ddl.ForeignTableTest.alterForeignTableRenameColumn(), com.mapd.parser.extension.ddl.ForeignTableTest.alterForeignTableRenameTable(), com.mapd.parser.extension.ddl.ForeignTableTest.alterForeignTableSetOptions(), com.mapd.parser.extension.ddl.ForeignServerTest.AlterServerChangeOwner(), com.mapd.parser.extension.ddl.ForeignServerTest.AlterServerRenameServer(), com.mapd.parser.extension.ddl.ForeignServerTest.AlterServerSetDataWrapper(), com.mapd.parser.extension.ddl.ForeignServerTest.AlterServerSetOptions(), com.mapd.parser.extension.ddl.InterruptCommandTest.alterSessionSetExecutor_cpu(), com.mapd.parser.extension.ddl.InterruptCommandTest.alterSessionSetExecutor_gpu(), com.mapd.parser.extension.ddl.InterruptCommandTest.alterSystemClear_cpu(), com.mapd.parser.extension.ddl.InterruptCommandTest.alterSystemClear_gpu(), com.mapd.parser.extension.ddl.InterruptCommandTest.alterSystemClear_render(), com.mapd.parser.extension.ddl.AlterTableTest.AlterTableAlterColumn(), com.mapd.parser.extension.ddl.ForeignTableTest.createForeignTableArraySized(), com.mapd.parser.extension.ddl.ForeignTableTest.createForeignTableArrayUnsized(), com.mapd.parser.extension.ddl.ForeignTableTest.createForeignTableBigInt(), com.mapd.parser.extension.ddl.ForeignTableTest.createForeignTableBoolean(), com.mapd.parser.extension.ddl.ForeignTableTest.createForeignTableColOptions(), com.mapd.parser.extension.ddl.ForeignTableTest.createForeignTableDate(), com.mapd.parser.extension.ddl.ForeignTableTest.createForeignTableDecimal(), com.mapd.parser.extension.ddl.ForeignTableTest.createForeignTableDouble(), com.mapd.parser.extension.ddl.ForeignTableTest.createForeignTableDoubleDecimal(), com.mapd.parser.extension.ddl.ForeignTableTest.createForeignTableEncodingCompressed(), com.mapd.parser.extension.ddl.ForeignTableTest.createForeignTableEncodingCompressed32(), com.mapd.parser.extension.ddl.ForeignTableTest.createForeignTableEncodingDays1(), com.mapd.parser.extension.ddl.ForeignTableTest.createForeignTableEncodingDaysWithoutSize(), com.mapd.parser.extension.ddl.ForeignTableTest.createForeignTableEncodingDict(), com.mapd.parser.extension.ddl.ForeignTableTest.createForeignTableEncodingDict8(), com.mapd.parser.extension.ddl.ForeignTableTest.createForeignTableEncodingFixed1(), com.mapd.parser.extension.ddl.ForeignTableTest.createForeignTableEncodingFixedWithoutSize(), com.mapd.parser.extension.ddl.ForeignTableTest.createForeignTableEncodingNone(), com.mapd.parser.extension.ddl.ForeignTableTest.createForeignTableEncodingNone1(), com.mapd.parser.extension.ddl.ForeignTableTest.createForeignTableEpoch(), com.mapd.parser.extension.ddl.ForeignTableTest.createForeignTableEscapeOption(), com.mapd.parser.extension.ddl.ForeignTableTest.createForeignTableFloat(), com.mapd.parser.extension.ddl.ForeignTableTest.createForeignTableGeoPoint(), com.mapd.parser.extension.ddl.ForeignTableTest.createForeignTableGeoPointMerc(), com.mapd.parser.extension.ddl.ForeignTableTest.createForeignTableGeoPointWG(), com.mapd.parser.extension.ddl.ForeignTableTest.createForeignTableIfNotExists(), com.mapd.parser.extension.ddl.ForeignTableTest.createForeignTableLinestring(), com.mapd.parser.extension.ddl.ForeignTableTest.createForeignTableMultiLinestring(), com.mapd.parser.extension.ddl.ForeignTableTest.createForeignTableMultiPoint(), com.mapd.parser.extension.ddl.ForeignTableTest.createForeignTableMultiPolygon(), com.mapd.parser.extension.ddl.ForeignTableTest.createForeignTableNotNull(), com.mapd.parser.extension.ddl.ForeignTableTest.createForeignTableOneCol(), com.mapd.parser.extension.ddl.ForeignTableTest.createForeignTableOptions(), com.mapd.parser.extension.ddl.ForeignTableTest.createForeignTablePoint(), com.mapd.parser.extension.ddl.ForeignTableTest.createForeignTablePointCompressed(), com.mapd.parser.extension.ddl.ForeignTableTest.createForeignTablePolygon(), com.mapd.parser.extension.ddl.ForeignTableTest.createForeignTableSchema(), com.mapd.parser.extension.ddl.ForeignTableTest.createForeignTableSmallInt(), com.mapd.parser.extension.ddl.ForeignTableTest.createForeignTableTime(), com.mapd.parser.extension.ddl.ForeignTableTest.createForeignTableTimestamp(), com.mapd.parser.extension.ddl.ForeignTableTest.createForeignTableTinyInt(), com.mapd.parser.extension.ddl.ForeignTableTest.createForeignTableTwoCol(), com.mapd.parser.extension.ddl.ForeignServerTest.CreateServerDdlCommand(), com.mapd.parser.extension.ddl.ForeignServerTest.CreateServerDdlCommandWithIfNotExists(), com.mapd.parser.extension.ddl.UserMappingTest.createUserMapping(), com.mapd.parser.extension.ddl.UserMappingTest.createUserMappingEmptyOptions(), com.mapd.parser.extension.ddl.UserMappingTest.createUserMappingForCurrentUser(), com.mapd.parser.extension.ddl.UserMappingTest.createUserMappingForPublicUser(), com.mapd.parser.extension.ddl.UserMappingTest.createUserMappingNoWithClause(), com.mapd.parser.extension.ddl.UserMappingTest.createUserMappingWithIfNotExists(), com.mapd.parser.extension.ddl.ForeignTableTest.dropForeignTable(), com.mapd.parser.extension.ddl.ForeignTableTest.dropForeignTableIfExists(), com.mapd.parser.extension.ddl.ForeignServerTest.DropServerDdlCommand(), com.mapd.parser.extension.ddl.ForeignServerTest.DropServerDdlCommandWithIfExists(), com.mapd.parser.extension.ddl.UserMappingTest.dropUserMapping(), com.mapd.parser.extension.ddl.UserMappingTest.dropUserMappingWithIfExists(), com.mapd.parser.extension.ddl.InsertValuesTest.insertValues(), com.mapd.parser.extension.ddl.InterruptCommandTest.killQuery(), com.mapd.parser.extension.ddl.ReassignOwnedTest.reassignAllOwned(), com.mapd.parser.extension.ddl.ReassignOwnedTest.reassignOwned(), com.mapd.parser.extension.ddl.ForeignTableTest.refresh_foreign_table(), com.mapd.parser.extension.ddl.ForeignTableTest.refresh_foreign_table_with_evict(), com.mapd.parser.extension.ddl.ForeignTableTest.refresh_foreign_tables(), com.mapd.parser.extension.ddl.ShowCommandTest.showAllUserDetails(), com.mapd.parser.extension.ddl.ShowCommandTest.showAllUserDetailsForUser(), com.mapd.parser.extension.ddl.ShowCommandTest.showDatabases(), com.mapd.parser.extension.ddl.ShowCommandTest.showDiskCacheUsage(), com.mapd.parser.extension.ddl.ShowCommandTest.showDiskCacheUsageFor(), com.mapd.parser.extension.ddl.ForeignServerTest.ShowForeignServers(), com.mapd.parser.extension.ddl.ForeignServerTest.ShowForeignServersEqOr(), com.mapd.parser.extension.ddl.ForeignServerTest.ShowForeignServersLike(), com.mapd.parser.extension.ddl.ForeignServerTest.ShowForeignServersLikeAnd(), com.mapd.parser.extension.ddl.ForeignServerTest.ShowForeignServersLikeAndLikeOrEq(), com.mapd.parser.extension.ddl.ForeignServerTest.ShowForeignServersWhere(), com.mapd.parser.extension.ddl.ShowCommandTest.showQueries(), com.mapd.parser.extension.ddl.ShowCommandTest.showSupportedDataSources(), com.mapd.parser.extension.ddl.ShowCommandTest.showTableDetails(), com.mapd.parser.extension.ddl.ShowCommandTest.showTableDetailsForTables(), com.mapd.parser.extension.ddl.ShowCommandTest.showTables(), com.mapd.parser.extension.ddl.ShowCommandTest.showUserDetails(), com.mapd.parser.extension.ddl.ShowCommandTest.showUserDetailsForUser(), and com.mapd.parser.extension.ddl.ShowCommandTest.showUserSessions().

35  {
36  TQueryParsingOption queryParsingOption = new TQueryParsingOption();
37  queryParsingOption.legacy_syntax = false;
38  queryParsingOption.is_explain = false;
39  queryParsingOption.check_privileges = false;
40  queryParsingOption.is_explain_detail = false;
41 
42  TOptimizationOption optimizationOption = new TOptimizationOption();
43  optimizationOption.is_view_optimize = false;
44  optimizationOption.enable_watchdog = false;
45  optimizationOption.filter_push_down_info = new ArrayList<>();
46 
47  return calciteServerHandler.process(
48  "", "", "", ddlCommand, queryParsingOption, optimizationOption, null);
49  }
void com.mapd.parser.extension.ddl.DDLTest.setup ( ) throws Exception
inline

Definition at line 27 of file DDLTest.java.

References com.mapd.parser.extension.ddl.DDLTest.calciteServerHandler, com.mapd.common.SockTransportProperties.getUnencryptedClient(), and com.mapd.parser.extension.ddl.DDLTest.resourceDirPath.

27  {
28  calciteServerHandler = new CalciteServerHandler(0,
29  "",
30  resourceDirPath + "ast/test_extension_functions.ast",
31  SockTransportProperties.getUnencryptedClient(),
32  "");
33  }
CalciteServerHandler calciteServerHandler
Definition: DDLTest.java:24

+ Here is the call graph for this function:

Member Data Documentation

CalciteServerHandler com.mapd.parser.extension.ddl.DDLTest.calciteServerHandler
private

Definition at line 24 of file DDLTest.java.

Referenced by com.mapd.parser.extension.ddl.DDLTest.setup().

final Gson com.mapd.parser.extension.ddl.DDLTest.gson = new Gson()
staticprotected

Definition at line 22 of file DDLTest.java.


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