1 package com.mapd.parser.extension.ddl;
3 import com.google.gson.annotations.Expose;
5 import org.apache.calcite.sql.SqlCreate;
6 import org.apache.calcite.sql.SqlIdentifier;
7 import org.apache.calcite.sql.SqlKind;
8 import org.apache.calcite.sql.SqlNode;
9 import org.apache.calcite.sql.SqlNodeList;
11 import org.apache.calcite.sql.SqlSpecialOperator;
12 import org.apache.calcite.sql.parser.SqlParserPos;
14 import org.apache.calcite.util.JsonBuilder;
16 import java.util.List;
24 new SqlSpecialOperator(
"CREATE_POLICY", SqlKind.OTHER_DDL);
40 this.command = OPERATOR.getName();
54 Map<String, Object> map = jsonBuilder.map();
56 map.put(
"command", this.command);
57 map.put(
"columnName", this.columnName);
59 List<Object> v = jsonBuilder.list();
65 jsonBuilder.put(map,
"valuesList", v);
67 map.put(
"granteeName", this.granteeName.toString());
69 Map<String, Object> payload = jsonBuilder.map();
70 payload.put(
"payload", map);
75 return jsonBuilder.toJsonString(payload);
List< SqlNode > getOperandList()
SqlIdentifier granteeName
List< String > columnName
static final SqlOperator OPERATOR
SqlCreatePolicy(final SqlParserPos pos, final List< String > columnName, final SqlNodeList valuesList, final SqlIdentifier granteeName)