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

Public Member Functions

 AlterTableTest ()
 
void AlterTableAlterColumn () 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 13 of file AlterTableTest.java.

Constructor & Destructor Documentation

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

Definition at line 14 of file AlterTableTest.java.

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

14  {
15  resourceDirPath = AlterTableTest.class.getClassLoader().getResource("").getPath();
16  jsonTestDir = "table";
17  }

Member Function Documentation

void com.mapd.parser.extension.ddl.AlterTableTest.AlterTableAlterColumn ( ) throws Exception
inline

Definition at line 20 of file AlterTableTest.java.

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

20  {
21  final JsonObject expectedJsonObject =
22  getJsonFromFile("alter_table_alter_column.json");
23  final TPlanResult result = processDdlCommand(
24  "ALTER TABLE test ALTER COLUMN a TYPE decimal(5,2) NULL, ALTER COLUMN b SET DATA TYPE TEXT NOT NULL ENCODING DICT(32);");
25  final JsonObject actualJsonObject =
26  gson.fromJson(result.plan_result, JsonObject.class);
27 
28  assertEquals(expectedJsonObject, actualJsonObject);
29  }
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: