Class Calcite

class Calcite

Public Functions

Calcite(const int db_port, const int port, const std::string &data_dir, const size_t calcite_max_mem, const size_t service_timeout, const bool service_keepalive, const std::string &udf_filename = "")
Calcite(const SystemParameters &db_parameters, const std::string &data_dir, const std::string &udf_filename = "")
TPlanResult process(query_state::QueryStateProxy query_state_proxy, std::string sql_string, const TQueryParsingOption &query_parsing_option, const TOptimizationOption &optimization_option, const std::string &calcite_session_id = "")
void checkAccessedObjectsPrivileges(query_state::QueryStateProxy query_state_prox, TPlanResult plan) const
std::vector<TCompletionHint> getCompletionHints(const Catalog_Namespace::SessionInfo &session_info, const std::vector<std::string> &visible_tables, const std::string sql_string, const int cursor)
std::string getExtensionFunctionWhitelist()
std::string getUserDefinedFunctionWhitelist()
void updateMetadata(std::string catalog, std::string table)
void close_calcite_server(bool log = true)
~Calcite()
std::string getRuntimeExtensionFunctionWhitelist()
void setRuntimeExtensionFunctions(const std::vector<TUserDefinedFunction> &udfs, const std::vector<TUserDefinedTableFunction> &udtfs, bool isruntime = true)
std::string const getInternalSessionProxyUserName()
std::string const getInternalSessionProxyPassword()
TQueryParsingOption getCalciteQueryParsingOption(bool legacy_syntax, bool is_explain, bool check_privileges)
TOptimizationOption getCalciteOptimizationOption(bool is_view_optimize, bool enable_watchdog, const std::vector<TFilterPushDownInfo> &filter_push_down_info)

Private Functions

void init(const int db_port, const int port, const std::string &data_dir, const size_t calcite_max_mem, const std::string &udf_filename)
void runServer(const int db_port, const int port, const std::string &data_dir, const size_t calcite_max_mem, const std::string &udf_filename)
TPlanResult processImpl(query_state::QueryStateProxy query_state_proxy, std::string sql_string, const TQueryParsingOption &query_parsing_option, const TOptimizationOption &optimization_option, const std::string &calcite_session_id)
std::vector<std::string> get_db_objects(const std::string ra)
void inner_close_calcite_server(bool log)
std::pair<std::shared_ptr<CalciteServerClient>, std::shared_ptr<TTransport>> getClient(int port)
int ping(int retry_num = 0, int max_retry = 50)

Private Members

std::shared_ptr<ThriftClientConnection> connMgr_
bool server_available_
size_t service_timeout_
bool service_keepalive_ = true
int remote_calcite_port_ = -1
std::string ssl_trust_store_
std::string ssl_trust_password_
std::string ssl_key_file_
std::string ssl_keystore_
std::string ssl_keystore_password_
std::string ssl_ca_file_
std::string db_config_file_
std::once_flag shutdown_once_flag_