1 package com.mapd.parser.extension.ddl;
3 import static org.junit.Assert.assertEquals;
4 import static org.junit.Assert.fail;
6 import com.google.gson.Gson;
7 import com.google.gson.JsonObject;
11 import org.junit.Before;
13 import java.io.FileReader;
14 import java.util.ArrayList;
16 import ai.heavy.thrift.calciteserver.TOptimizationOption;
17 import ai.heavy.thrift.calciteserver.TPlanResult;
18 import ai.heavy.thrift.calciteserver.TQueryParsingOption;
22 protected static final Gson
gson =
new Gson();
27 public void setup() throws Exception {
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;
42 TOptimizationOption optimizationOption =
new TOptimizationOption();
43 optimizationOption.is_view_optimize =
false;
44 optimizationOption.enable_watchdog =
false;
45 optimizationOption.filter_push_down_info =
new ArrayList<>();
47 return calciteServerHandler.process(
48 "",
"",
"", ddlCommand, queryParsingOption, optimizationOption, null);
53 return gson.fromJson(
new FileReader(filePath), JsonObject.class);
JsonObject getJsonFromFile(final String fileName)
CalciteServerHandler calciteServerHandler
TPlanResult processDdlCommand(final String ddlCommand)
static SockTransportProperties getUnencryptedClient()