1 package com.mapd.parser.extension.ddl.heavydb;
3 import org.apache.calcite.runtime.CalciteException;
4 import org.apache.calcite.sql.SqlLiteral;
5 import org.apache.calcite.sql.SqlNode;
6 import org.apache.calcite.sql.type.SqlTypeName;
8 import java.util.HashMap;
12 if (value instanceof SqlLiteral) {
13 SqlLiteral literalValue = (SqlLiteral) value;
14 if (SqlTypeName.STRING_TYPES.contains(literalValue.getTypeName())) {
15 map.put(key, ((SqlLiteral) value).getValueAs(String.class));
17 map.put(key, ((SqlLiteral) value).getValue());
20 throw new CalciteException(
"Unsupported with value type for value : `"
21 + value.toString() +
"` (option : `" + key +
"`)",
static void add(HeavyDBOptionsMap map, String key, SqlNode value)