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

Public Member Functions

 SqlCreateDataframe (final SqlParserPos pos, SqlIdentifier name, SqlNodeList elementList, SqlNode filePath, HeavyDBOptionsMap options)
 
List< SqlNode > getOperandList ()
 
String toString ()
 

Package Attributes

HeavyDBOptionsMap options
 

Private Attributes

String command
 
SqlIdentifier name
 
SqlNodeList elementList
 
SqlNode filePath
 

Static Private Attributes

static final SqlOperator OPERATOR
 

Detailed Description

Class that encapsulates all information associated with a CREATE DATAFRAME DDL command.

Definition at line 25 of file SqlCreateDataframe.java.

Constructor & Destructor Documentation

com.mapd.parser.extension.ddl.SqlCreateDataframe.SqlCreateDataframe ( final SqlParserPos  pos,
SqlIdentifier  name,
SqlNodeList  elementList,
SqlNode  filePath,
HeavyDBOptionsMap  options 
)
inline

Member Function Documentation

List<SqlNode> com.mapd.parser.extension.ddl.SqlCreateDataframe.getOperandList ( )
inline

Definition at line 54 of file SqlCreateDataframe.java.

54  {
55  return null;
56  }
String com.mapd.parser.extension.ddl.SqlCreateDataframe.toString ( )
inline

Definition at line 59 of file SqlCreateDataframe.java.

References com.mapd.parser.extension.ddl.SqlCreateDataframe.elementList, com.mapd.parser.extension.ddl.SqlCreateDataframe.name, and com.mapd.parser.extension.ddl.SqlCreateDataframe.options.

59  {
60  JsonBuilder jsonBuilder = new EscapedStringJsonBuilder();
61  Map<String, Object> map = jsonBuilder.map();
62 
63  map.put("command", this.command);
64  map.put("name", this.name.toString());
65 
66  List<Object> elements_list = jsonBuilder.list();
67  if (elementList != null) {
68  for (SqlNode elementNode : this.elementList) {
69  if (!(elementNode instanceof SqlCall)) {
70  throw new CalciteException("Column definition for dataframe "
71  + this.name.toString()
72  + " is invalid: " + elementNode.toString(),
73  null);
74  }
75  elements_list.add(elementNode);
76  }
77  }
78  jsonBuilder.put(map, "elementList", elements_list);
79 
80  jsonBuilder.put(map, "filePath", this.filePath.toString());
81 
82  if (this.options != null) {
83  map.put("options", this.options);
84  }
85 
86  Map<String, Object> payload = jsonBuilder.map();
87  payload.put("payload", map);
88 
89  // To Debug:
90  // System.out.println(jsonBuilder.toJsonString(payload));
91 
92  return jsonBuilder.toJsonString(payload);
93  }

Member Data Documentation

String com.mapd.parser.extension.ddl.SqlCreateDataframe.command
private

Definition at line 30 of file SqlCreateDataframe.java.

SqlNodeList com.mapd.parser.extension.ddl.SqlCreateDataframe.elementList
private
SqlNode com.mapd.parser.extension.ddl.SqlCreateDataframe.filePath
private
final SqlOperator com.mapd.parser.extension.ddl.SqlCreateDataframe.OPERATOR
staticprivate
Initial value:
=
new SqlSpecialOperator("CREATE_DATAFRAME", SqlKind.OTHER_DDL)

Definition at line 26 of file SqlCreateDataframe.java.

Referenced by com.mapd.parser.extension.ddl.SqlCreateDataframe.SqlCreateDataframe().

HeavyDBOptionsMap com.mapd.parser.extension.ddl.SqlCreateDataframe.options
package

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