OmniSciDB
a5dc49c757
|
#include <DBHandler.h>
Classes | |
struct | DeferredCopyFromSessions |
struct | DeferredCopyFromState |
Public Member Functions | |
DBHandler (const std::vector< LeafHostInfo > &db_leaves, const std::vector< LeafHostInfo > &string_leaves, const std::string &base_data_path, const bool allow_multifrag, const bool jit_debug, const bool intel_jit_profile, const bool read_only, const bool allow_loop_joins, const bool enable_rendering, const bool renderer_prefer_igpu, const unsigned renderer_vulkan_timeout_ms, const bool renderer_use_parallel_executors, const bool enable_auto_clear_render_mem, const int render_oom_retry_threshold, const size_t render_mem_bytes, const size_t max_concurrent_render_sessions, const size_t reserved_gpu_mem, const bool render_compositor_use_last_gpu, const bool renderer_enable_slab_allocation, const size_t num_reader_threads, const AuthMetadata &authMetadata, SystemParameters &system_parameters, const bool legacy_syntax, const int idle_session_duration, const int max_session_duration, const std::string &udf_filename, const std::string &clang_path, const std::vector< std::string > &clang_options, const File_Namespace::DiskCacheConfig &disk_cache_config, const bool is_new_db) | |
void | initialize (const bool is_new_db) |
~DBHandler () override | |
void | krb5_connect (TKrb5Session &session, const std::string &token, const std::string &dbname) override |
void | connect (TSessionId &session, const std::string &username, const std::string &passwd, const std::string &dbname) override |
void | disconnect (const TSessionId &session) override |
void | switch_database (const TSessionId &session, const std::string &dbname) override |
void | clone_session (TSessionId &session2, const TSessionId &session1) override |
void | get_server_status (TServerStatus &_return, const TSessionId &session) override |
void | get_status (std::vector< TServerStatus > &_return, const TSessionId &session) override |
void | get_hardware_info (TClusterHardwareInfo &_return, const TSessionId &session) override |
bool | hasTableAccessPrivileges (const TableDescriptor *td, const Catalog_Namespace::SessionInfo &session_info) |
void | get_tables (std::vector< std::string > &_return, const TSessionId &session) override |
void | get_tables_for_database (std::vector< std::string > &_return, const TSessionId &session, const std::string &database_name) override |
void | get_physical_tables (std::vector< std::string > &_return, const TSessionId &session) override |
void | get_views (std::vector< std::string > &_return, const TSessionId &session) override |
void | get_tables_meta (std::vector< TTableMeta > &_return, const TSessionId &session) override |
void | get_table_details (TTableDetails &_return, const TSessionId &session, const std::string &table_name) override |
void | get_table_details_for_database (TTableDetails &_return, const TSessionId &session, const std::string &table_name, const std::string &database_name) override |
void | get_internal_table_details (TTableDetails &_return, const TSessionId &session, const std::string &table_name, const bool include_system_columns) override |
void | get_internal_table_details_for_database (TTableDetails &_return, const TSessionId &session, const std::string &table_name, const std::string &database_name) override |
void | get_users (std::vector< std::string > &_return, const TSessionId &session) override |
void | get_databases (std::vector< TDBInfo > &_return, const TSessionId &session) override |
void | get_version (std::string &_return) override |
void | start_heap_profile (const TSessionId &session) override |
void | stop_heap_profile (const TSessionId &session) override |
void | get_heap_profile (std::string &_return, const TSessionId &session) override |
void | get_memory (std::vector< TNodeMemoryInfo > &_return, const TSessionId &session, const std::string &memory_level) override |
void | clear_cpu_memory (const TSessionId &session) override |
void | clear_gpu_memory (const TSessionId &session) override |
void | clearRenderMemory (const TSessionId &session) |
void | pause_executor_queue (const TSessionId &session) |
void | resume_executor_queue (const TSessionId &session) |
void | set_cur_session (const TSessionId &parent_session, const TSessionId &leaf_session, const std::string &start_time_str, const std::string &label, bool for_running_query_kernel) override |
void | invalidate_cur_session (const TSessionId &parent_session, const TSessionId &leaf_session, const std::string &start_time_str, const std::string &label, bool for_running_query_kernel) override |
void | set_table_epoch (const TSessionId &session, const int db_id, const int table_id, const int new_epoch) override |
void | set_table_epoch_by_name (const TSessionId &session, const std::string &table_name, const int new_epoch) override |
int32_t | get_table_epoch (const TSessionId &session, const int32_t db_id, const int32_t table_id) override |
int32_t | get_table_epoch_by_name (const TSessionId &session, const std::string &table_name) override |
void | get_table_epochs (std::vector< TTableEpochInfo > &_return, const TSessionId &session, const int32_t db_id, const int32_t table_id) override |
void | set_table_epochs (const TSessionId &session, const int32_t db_id, const std::vector< TTableEpochInfo > &table_epochs) override |
void | get_session_info (TSessionInfo &_return, const TSessionId &session) override |
void | set_leaf_info (const TSessionId &session, const TLeafInfo &info) override |
void | sql_execute (ExecutionResult &_return, const TSessionId &session, const std::string &query, const bool column_format, const int32_t first_n, const int32_t at_most_n, lockmgr::LockedTableDescriptors &locks) |
void | sql_execute (TQueryResult &_return, const TSessionId &session, const std::string &query, const bool column_format, const std::string &nonce, const int32_t first_n, const int32_t at_most_n) override |
void | get_completion_hints (std::vector< TCompletionHint > &hints, const TSessionId &session, const std::string &sql, const int cursor) override |
void | sql_execute_df (TDataFrame &_return, const TSessionId &session, const std::string &query, const TDeviceType::type device_type, const int32_t device_id, const int32_t first_n, const TArrowTransport::type transport_method) override |
void | sql_execute_gdf (TDataFrame &_return, const TSessionId &session, const std::string &query, const int32_t device_id, const int32_t first_n) override |
void | deallocate_df (const TSessionId &session, const TDataFrame &df, const TDeviceType::type device_type, const int32_t device_id) override |
void | interrupt (const TSessionId &query_session, const TSessionId &interrupt_session) override |
void | sql_validate (TRowDescriptor &_return, const TSessionId &session, const std::string &query) override |
TExecuteMode::type | getExecutionMode (const TSessionId &session) |
void | set_execution_mode (const TSessionId &session, const TExecuteMode::type mode) override |
void | render_vega (TRenderResult &_return, const TSessionId &session, const int64_t widget_id, const std::string &vega_json, const int32_t compression_level, const std::string &nonce) override |
void | get_result_row_for_pixel (TPixelTableRowResult &_return, const TSessionId &session, const int64_t widget_id, const TPixel &pixel, const std::map< std::string, std::vector< std::string >> &table_col_names, const bool column_format, const int32_t pixel_radius, const std::string &nonce) override |
int32_t | create_custom_expression (const TSessionId &session, const TCustomExpression &custom_expression) override |
void | get_custom_expressions (std::vector< TCustomExpression > &_return, const TSessionId &session) override |
void | update_custom_expression (const TSessionId &session, const int32_t id, const std::string &expression_json) override |
void | delete_custom_expressions (const TSessionId &session, const std::vector< int32_t > &custom_expression_ids, const bool do_soft_delete) override |
void | get_dashboard (TDashboard &_return, const TSessionId &session, const int32_t dashboard_id) override |
void | get_dashboards (std::vector< TDashboard > &_return, const TSessionId &session) override |
int32_t | create_dashboard (const TSessionId &session, const std::string &dashboard_name, const std::string &dashboard_state, const std::string &image_hash, const std::string &dashboard_metadata) override |
void | replace_dashboard (const TSessionId &session, const int32_t dashboard_id, const std::string &dashboard_name, const std::string &dashboard_owner, const std::string &dashboard_state, const std::string &image_hash, const std::string &dashboard_metadata) override |
void | delete_dashboard (const TSessionId &session, const int32_t dashboard_id) override |
void | share_dashboards (const TSessionId &session, const std::vector< int32_t > &dashboard_ids, const std::vector< std::string > &groups, const TDashboardPermissions &permissions) override |
void | delete_dashboards (const TSessionId &session, const std::vector< int32_t > &dashboard_ids) override |
void | share_dashboard (const TSessionId &session, const int32_t dashboard_id, const std::vector< std::string > &groups, const std::vector< std::string > &objects, const TDashboardPermissions &permissions, const bool grant_role) override |
void | unshare_dashboards (const TSessionId &session, const std::vector< int32_t > &dashboard_ids, const std::vector< std::string > &groups, const TDashboardPermissions &permissions) override |
void | unshare_dashboard (const TSessionId &session, const int32_t dashboard_id, const std::vector< std::string > &groups, const std::vector< std::string > &objects, const TDashboardPermissions &permissions) override |
void | get_dashboard_grantees (std::vector< TDashboardGrantees > &_return, const TSessionId &session, const int32_t dashboard_id) override |
void | get_link_view (TFrontendView &_return, const TSessionId &session, const std::string &link) override |
void | create_link (std::string &_return, const TSessionId &session, const std::string &view_state, const std::string &view_metadata) override |
void | load_table_binary (const TSessionId &session, const std::string &table_name, const std::vector< TRow > &rows, const std::vector< std::string > &column_names) override |
void | load_table_binary_columnar (const TSessionId &session, const std::string &table_name, const std::vector< TColumn > &cols, const std::vector< std::string > &column_names) override |
void | load_table_binary_arrow (const TSessionId &session, const std::string &table_name, const std::string &arrow_stream, const bool use_column_names) override |
void | load_table (const TSessionId &session, const std::string &table_name, const std::vector< TStringRow > &rows, const std::vector< std::string > &column_names) override |
void | detect_column_types (TDetectResult &_return, const TSessionId &session, const std::string &file_name, const TCopyParams ©_params) override |
void | create_table (const TSessionId &session, const std::string &table_name, const TRowDescriptor &row_desc, const TCreateParams &create_params) override |
void | import_table (const TSessionId &session, const std::string &table_name, const std::string &file_name, const TCopyParams ©_params) override |
void | import_geo_table (const TSessionId &session, const std::string &table_name, const std::string &file_name, const TCopyParams ©_params, const TRowDescriptor &row_desc, const TCreateParams &create_params) override |
void | import_table_status (TImportStatus &_return, const TSessionId &session, const std::string &import_id) override |
void | get_first_geo_file_in_archive (std::string &_return, const TSessionId &session, const std::string &archive_path, const TCopyParams ©_params) override |
void | get_all_files_in_archive (std::vector< std::string > &_return, const TSessionId &session, const std::string &archive_path, const TCopyParams ©_params) override |
void | get_layers_in_geo_file (std::vector< TGeoFileLayerInfo > &_return, const TSessionId &session, const std::string &file_name, const TCopyParams ©_params) override |
int64_t | query_get_outer_fragment_count (const TSessionId &session, const std::string &select_query) override |
void | check_table_consistency (TTableMeta &_return, const TSessionId &session, const int32_t table_id) override |
void | start_query (TPendingQuery &_return, const TSessionId &leaf_session, const TSessionId &parent_session, const std::string &serialized_rel_alg_dag, const std::string &start_time_str, const bool just_explain, const std::vector< int64_t > &outer_fragment_indices) override |
void | execute_query_step (TStepResult &_return, const TPendingQuery &pending_query, const TSubqueryId subquery_id, const std::string &start_time_str) override |
void | broadcast_serialized_rows (const TSerializedRows &serialized_rows, const TRowDescriptor &row_desc, const TQueryId query_id, const TSubqueryId subquery_id, const bool is_final_subquery_result) override |
void | start_render_query (TPendingRenderQuery &_return, const TSessionId &session, const int64_t widget_id, const int16_t node_idx, const std::string &vega_json) override |
void | execute_next_render_step (TRenderStepResult &_return, const TPendingRenderQuery &pending_render, const TRenderAggDataMap &merged_data) override |
void | insert_data (const TSessionId &session, const TInsertData &insert_data) override |
void | insert_chunks (const TSessionId &session, const TInsertChunks &insert_chunks) override |
void | checkpoint (const TSessionId &session, const int32_t table_id) override |
void | get_roles (std::vector< std::string > &_return, const TSessionId &session) override |
bool | has_role (const TSessionId &sessionId, const std::string &granteeName, const std::string &roleName) override |
bool | has_object_privilege (const TSessionId &sessionId, const std::string &granteeName, const std::string &objectName, const TDBObjectType::type object_type, const TDBObjectPermissions &permissions) override |
void | get_db_objects_for_grantee (std::vector< TDBObject > &_return, const TSessionId &session, const std::string &roleName) override |
void | get_db_object_privs (std::vector< TDBObject > &_return, const TSessionId &session, const std::string &objectName, const TDBObjectType::type type) override |
void | get_all_roles_for_user (std::vector< std::string > &_return, const TSessionId &session, const std::string &granteeName) override |
void | get_all_effective_roles_for_user (std::vector< std::string > &_return, const TSessionId &session, const std::string &granteeName) override |
std::vector< std::string > | get_valid_groups (const TSessionId &session, int32_t dashboard_id, std::vector< std::string > groups) |
void | set_license_key (TLicenseInfo &_return, const TSessionId &session, const std::string &key, const std::string &nonce) override |
void | get_license_claims (TLicenseInfo &_return, const TSessionId &session, const std::string &nonce) override |
void | get_device_parameters (std::map< std::string, std::string > &_return, const TSessionId &session) override |
void | register_runtime_extension_functions (const TSessionId &session, const std::vector< TUserDefinedFunction > &udfs, const std::vector< TUserDefinedTableFunction > &udtfs, const std::map< std::string, std::string > &device_ir_map) override |
void | get_function_names (std::vector< std::string > &_return, const TSessionId &session) override |
void | get_runtime_function_names (std::vector< std::string > &_return, const TSessionId &session) override |
void | get_function_details (std::vector< TUserDefinedFunction > &_return, const TSessionId &session, const std::vector< std::string > &udf_names) override |
void | get_table_function_names (std::vector< std::string > &_return, const TSessionId &session) override |
void | get_runtime_table_function_names (std::vector< std::string > &_return, const TSessionId &session) override |
void | get_table_function_details (std::vector< TUserDefinedTableFunction > &_return, const TSessionId &session, const std::vector< std::string > &udtf_names) override |
void | shutdown () |
void | emergency_shutdown () |
TSessionId | getInvalidSessionId () const |
void | internal_connect (TSessionId &session, const std::string &username, const std::string &dbname) |
bool | isAggregator () const |
bool | checkInMemorySystemTableQuery (const std::unordered_set< shared::TableKey > &tables_selected_from) const |
template<typename... ARGS> | |
std::shared_ptr < query_state::QueryState > | create_query_state (ARGS &&...args) |
Catalog_Namespace::SessionInfo | get_session_copy (const TSessionId &session_id) |
void | get_tables_meta_impl (std::vector< TTableMeta > &_return, QueryStateProxy query_state_proxy, const Catalog_Namespace::SessionInfo &session_info, const bool with_table_locks=true) |
void | resizeDispatchQueue (size_t queue_size) |
Static Public Member Functions | |
static size_t | max_bytes_for_thrift () |
Protected Member Functions | |
std::shared_ptr < Catalog_Namespace::SessionInfo > | get_session_ptr (const TSessionId &session_id) |
ConnectionInfo | getConnectionInfo () const |
Private Member Functions | |
void | init_executor_resource_mgr () |
void | validate_configurations () |
std::shared_ptr < Catalog_Namespace::SessionInfo > | create_new_session (TSessionId &session, const std::string &dbname, const Catalog_Namespace::UserMetadata &user_meta, std::shared_ptr< Catalog_Namespace::Catalog > cat) |
void | connect_impl (TSessionId &session, const std::string &passwd, const std::string &dbname, const Catalog_Namespace::UserMetadata &user_meta, std::shared_ptr< Catalog_Namespace::Catalog > cat, query_state::StdLog &stdlog) |
void | disconnect_impl (Catalog_Namespace::SessionInfoPtr &session_ptr) |
void | check_table_load_privileges (const Catalog_Namespace::SessionInfo &session_info, const std::string &table_name) |
void | get_tables_impl (std::vector< std::string > &table_names, const Catalog_Namespace::SessionInfo &, const GetTablesType get_tables_type, const std::string &database_name={}) |
void | get_table_details_impl (TTableDetails &_return, query_state::StdLog &stdlog, const std::string &table_name, const bool get_system, const bool get_physical, const std::string &database_name={}) |
void | getAllRolesForUserImpl (std::shared_ptr< Catalog_Namespace::SessionInfo const > session_ptr, std::vector< std::string > &roles, const std::string &granteeName, bool effective) |
void | check_read_only (const std::string &str) |
void | validateGroups (const std::vector< std::string > &groups) |
void | validateDashboardIdsForSharing (const Catalog_Namespace::SessionInfo &session_info, const std::vector< int32_t > &dashboard_ids) |
void | shareOrUnshareDashboards (const TSessionId &session, const std::vector< int32_t > &dashboard_ids, const std::vector< std::string > &groups, const TDashboardPermissions &permissions, const bool do_share) |
std::pair< TPlanResult, lockmgr::LockedTableDescriptors > | parse_to_ra (QueryStateProxy, const std::string &query_str, const std::vector< TFilterPushDownInfo > &filter_push_down_info, const bool acquire_locks, const SystemParameters &system_parameters, bool check_privileges=true) |
void | sql_execute_local (TQueryResult &_return, const QueryStateProxy &query_state_proxy, const std::shared_ptr< Catalog_Namespace::SessionInfo > session_ptr, const std::string &query_str, const bool column_format, const std::string &nonce, const int32_t first_n, const int32_t at_most_n, const bool use_calcite) |
int64_t | process_deferred_copy_from (const TSessionId &session_id) |
void | sql_execute_impl (ExecutionResult &_return, QueryStateProxy, const bool column_format, const ExecutorDeviceType executor_device_type, const int32_t first_n, const int32_t at_most_n, const bool use_calcite, lockmgr::LockedTableDescriptors &locks) |
bool | user_can_access_table (const Catalog_Namespace::SessionInfo &, const TableDescriptor *td, const AccessPrivileges acess_priv) |
void | execute_distributed_copy_statement (Parser::CopyTableStmt *, const Catalog_Namespace::SessionInfo &session_info) |
TPlanResult | processCalciteRequest (QueryStateProxy, const std::shared_ptr< Catalog_Namespace::Catalog > &cat, const std::string &query_str, const std::vector< TFilterPushDownInfo > &filter_push_down_info, const SystemParameters &system_parameters, const bool check_privileges) |
TRowDescriptor | validateRelAlg (const std::string &query_ra, QueryStateProxy query_state_proxy) |
void | dispatch_query_task (std::shared_ptr< QueryDispatchQueue::Task > query_task, const bool is_update_delete) |
std::vector< PushedDownFilterInfo > | execute_rel_alg (ExecutionResult &_return, QueryStateProxy, const std::string &query_ra, const bool column_format, const ExecutorDeviceType executor_device_type, const int32_t first_n, const int32_t at_most_n, const bool just_validate, const bool find_push_down_candidates, const ExplainInfo &explain_info, const std::optional< size_t > executor_index=std::nullopt) const |
void | execute_rel_alg_with_filter_push_down (ExecutionResult &_return, QueryStateProxy, std::string &query_ra, const bool column_format, const ExecutorDeviceType executor_device_type, const int32_t first_n, const int32_t at_most_n, const bool just_explain, const bool just_calcite_explain, const std::vector< PushedDownFilterInfo > &filter_push_down_requests) |
void | executeDdl (TQueryResult &_return, const std::string &query_ra, std::shared_ptr< Catalog_Namespace::SessionInfo const > session_ptr) |
void | executeDdl (ExecutionResult &_return, const std::string &query_ra, std::shared_ptr< Catalog_Namespace::SessionInfo const > session_ptr) |
TColumnType | populateThriftColumnType (const Catalog_Namespace::Catalog *cat, const ColumnDescriptor *cd) |
void | set_execution_mode_nolock (Catalog_Namespace::SessionInfo *session_ptr, const TExecuteMode::type mode) |
char | unescape_char (std::string str) |
import_export::CopyParams | thrift_to_copyparams (const TCopyParams &cp) |
TCopyParams | copyparams_to_thrift (const import_export::CopyParams &cp) |
void | check_geospatial_files (const boost::filesystem::path file_path, const import_export::CopyParams ©_params) |
void | render_rel_alg (TRenderResult &_return, const std::string &query_ra, const std::string &query_str, const Catalog_Namespace::SessionInfo &session_info, const std::string &render_type, const bool is_projection_query) |
TColumnType | create_geo_column (const TDatumType::type type, const std::string &name, const bool is_array) |
void | convertResultSet (ExecutionResult &result, const Catalog_Namespace::SessionInfo &session_info, const std::string &query_state_str, TQueryResult &_return) |
std::vector< TargetMetaInfo > | getTargetMetaInfo (const std::vector< std::shared_ptr< Analyzer::TargetEntry >> &targets) const |
std::vector< std::string > | getTargetNames (const std::vector< TargetMetaInfo > &targets) const |
std::vector< std::string > | getTargetNames (const std::vector< std::shared_ptr< Analyzer::TargetEntry >> &targets) const |
void | get_completion_hints_unsorted (std::vector< TCompletionHint > &hints, std::vector< std::string > &visible_tables, query_state::StdLog &stdlog, const std::string &sql, const int cursor) |
void | get_token_based_completions (std::vector< TCompletionHint > &hints, query_state::StdLog &stdlog, std::vector< std::string > &visible_tables, const std::string &sql, const int cursor) |
std::unordered_map < std::string, std::unordered_set < std::string > > | fill_column_names_by_table (std::vector< std::string > &table_names, query_state::StdLog &stdlog) |
TDashboard | get_dashboard_impl (const std::shared_ptr< Catalog_Namespace::SessionInfo const > &session_ptr, Catalog_Namespace::UserMetadata &user_meta, const DashboardDescriptor *dash, const bool populate_state=true) |
std::unordered_set< std::string > | get_uc_compatible_table_names_by_column (const std::unordered_set< std::string > &uc_column_names, std::vector< std::string > &table_names, query_state::StdLog &stdlog) |
std::unique_ptr < lockmgr::AbstractLockContainer < const TableDescriptor * > > | prepare_loader_generic (const Catalog_Namespace::SessionInfo &session_info, const std::string &table_name, size_t num_cols, std::unique_ptr< import_export::Loader > *loader, std::vector< std::unique_ptr< import_export::TypedImportBuffer >> *import_buffers, const std::vector< std::string > &column_names, std::string load_type) |
void | fillGeoColumns (const TSessionId &session, const Catalog_Namespace::Catalog &catalog, std::vector< std::unique_ptr< import_export::TypedImportBuffer >> &import_buffers, const ColumnDescriptor *cd, size_t &col_idx, size_t num_rows, const std::string &table_name) |
void | fillMissingBuffers (const TSessionId &session, const Catalog_Namespace::Catalog &catalog, std::vector< std::unique_ptr< import_export::TypedImportBuffer >> &import_buffers, const std::list< const ColumnDescriptor * > &cds, const std::vector< int > &desc_id_to_column_id, size_t num_rows, const std::string &table_name) |
Catalog_Namespace::SessionInfoPtr | findCalciteSession (TSessionId const &) const |
void | check_and_invalidate_sessions (Parser::DDLStmt *ddl) |
std::string const | createInMemoryCalciteSession (const std::shared_ptr< Catalog_Namespace::Catalog > &catalog_ptr) |
void | removeInMemoryCalciteSession (const std::string &session_id) |
ExecutionResult | getUserSessions (std::shared_ptr< Catalog_Namespace::SessionInfo const > session_ptr) |
ExecutionResult | getQueries (std::shared_ptr< Catalog_Namespace::SessionInfo const > session_ptr) |
void | get_queries_info (std::vector< TQueryInfo > &_return, const TSessionId &session) override |
void | interruptQuery (const Catalog_Namespace::SessionInfo &session_info, const std::string &target_session) |
void | alterSystemClear (const std::string &sesson_id, ExecutionResult &result, const std::string &cache_type, int64_t &execution_time_ms) |
void | alterSession (const std::string &sesson_id, ExecutionResult &result, const std::pair< std::string, std::string > &session_parameter, int64_t &execution_time_ms) |
TRole::type | getServerRole () const |
void | importGeoTableGlobFilterSort (const TSessionId &session, const std::string &table_name, const std::string &file_name, const import_export::CopyParams ©_params, const TRowDescriptor &row_desc, const TCreateParams &create_params) |
void | importGeoTableSingle (const TSessionId &session, const std::string &table_name, const std::string &file_name, const import_export::CopyParams ©_params, const TRowDescriptor &row_desc, const TCreateParams &create_params) |
void | resetSessionsStore () |
Static Private Member Functions | |
static void | value_to_thrift_column (const TargetValue &tv, const SQLTypeInfo &ti, TColumn &column) |
static TDatum | value_to_thrift (const TargetValue &tv, const SQLTypeInfo &ti) |
static void | convertData (TQueryResult &_return, ExecutionResult &result, const QueryStateProxy &query_state_proxy, const bool column_format, const int32_t first_n, const int32_t at_most_n) |
static void | convertExplain (TQueryResult &_return, const ResultSet &results, const bool column_format) |
static void | convertResult (TQueryResult &_return, const ResultSet &results, const bool column_format) |
static void | convertRows (TQueryResult &_return, QueryStateProxy query_state_proxy, const std::vector< TargetMetaInfo > &targets, const ResultSet &results, const bool column_format, const int32_t first_n, const int32_t at_most_n) |
static void | createSimpleResult (TQueryResult &_return, const ResultSet &results, const bool column_format, const std::string label) |
static bool | has_database_permission (const AccessPrivileges &privs, const TDBObjectPermissions &permissions) |
static bool | has_table_permission (const AccessPrivileges &privs, const TDBObjectPermissions &permission) |
static bool | has_dashboard_permission (const AccessPrivileges &privs, const TDBObjectPermissions &permissions) |
static bool | has_view_permission (const AccessPrivileges &privs, const TDBObjectPermissions &permissions) |
static bool | has_server_permission (const AccessPrivileges &privs, const TDBObjectPermissions &permissions) |
Friends | |
class | RenderHandler::Impl |
class | HeavyDBAggHandler |
class | HeavyDBLeafHandler |
void | run_warmup_queries (std::shared_ptr< DBHandler > handler, std::string base_path, std::string query_file_path) |
Definition at line 165 of file DBHandler.h.
DBHandler::DBHandler | ( | const std::vector< LeafHostInfo > & | db_leaves, |
const std::vector< LeafHostInfo > & | string_leaves, | ||
const std::string & | base_data_path, | ||
const bool | allow_multifrag, | ||
const bool | jit_debug, | ||
const bool | intel_jit_profile, | ||
const bool | read_only, | ||
const bool | allow_loop_joins, | ||
const bool | enable_rendering, | ||
const bool | renderer_prefer_igpu, | ||
const unsigned | renderer_vulkan_timeout_ms, | ||
const bool | renderer_use_parallel_executors, | ||
const bool | enable_auto_clear_render_mem, | ||
const int | render_oom_retry_threshold, | ||
const size_t | render_mem_bytes, | ||
const size_t | max_concurrent_render_sessions, | ||
const size_t | reserved_gpu_mem, | ||
const bool | render_compositor_use_last_gpu, | ||
const bool | renderer_enable_slab_allocation, | ||
const size_t | num_reader_threads, | ||
const AuthMetadata & | authMetadata, | ||
SystemParameters & | system_parameters, | ||
const bool | legacy_syntax, | ||
const int | idle_session_duration, | ||
const int | max_session_duration, | ||
const std::string & | udf_filename, | ||
const std::string & | clang_path, | ||
const std::vector< std::string > & | clang_options, | ||
const File_Namespace::DiskCacheConfig & | disk_cache_config, | ||
const bool | is_new_db | ||
) |
Definition at line 169 of file DBHandler.cpp.
|
override |
Definition at line 576 of file DBHandler.cpp.
References shutdown().
|
private |
Definition at line 8045 of file DBHandler.cpp.
References measure< TimeT >::execution(), set_execution_mode(), switch_database(), to_upper(), and run_benchmark_import::type.
Referenced by executeDdl().
|
private |
Definition at line 8029 of file DBHandler.cpp.
References clear_cpu_memory(), clear_gpu_memory(), clearRenderMemory(), measure< TimeT >::execution(), and to_upper().
Referenced by executeDdl().
|
override |
Definition at line 7106 of file DBHandler.cpp.
References measure< TimeT >::execution(), logger::INFO, leaf_handler_, LOG, and THROW_DB_EXCEPTION.
|
private |
Definition at line 6433 of file DBHandler.cpp.
References sessions_store_.
|
private |
Definition at line 5170 of file DBHandler.cpp.
References import_export::Importer::gdalFileExists().
Referenced by detect_column_types(), and importGeoTableSingle().
|
private |
Definition at line 580 of file DBHandler.cpp.
References read_only_, and THROW_DB_EXCEPTION.
Referenced by create_custom_expression(), create_dashboard(), create_table(), delete_custom_expressions(), delete_dashboards(), detect_column_types(), import_table(), importGeoTableSingle(), prepare_loader_generic(), replace_dashboard(), set_license_key(), shareOrUnshareDashboards(), sql_execute_impl(), and update_custom_expression().
|
override |
Definition at line 7037 of file DBHandler.cpp.
References get_session_ptr(), leaf_handler_, heavyai::RequestInfo::requestId(), heavyai::RequestInfo::sessionId(), SET_REQUEST_ID, STDLOG, and THROW_DB_EXCEPTION.
|
private |
Definition at line 6169 of file DBHandler.cpp.
References cat(), Catalog_Namespace::SessionInfo::get_currentUser(), Catalog_Namespace::SessionInfo::getCatalog(), AccessPrivileges::INSERT_INTO_TABLE, lockmgr::instance(), DBObject::loadKey(), DBObject::setPrivileges(), TableDBObjectType, and THROW_DB_EXCEPTION.
Referenced by import_table(), importGeoTableSingle(), and prepare_loader_generic().
bool DBHandler::checkInMemorySystemTableQuery | ( | const std::unordered_set< shared::TableKey > & | tables_selected_from | ) | const |
Definition at line 8184 of file DBHandler.cpp.
References CHECK, anonymous_namespace{DBHandler.cpp}::check_and_reset_in_memory_system_table(), Catalog_Namespace::SysCatalog::getCatalog(), Catalog_Namespace::SysCatalog::instance(), and shared::kInfoSchemaDbName.
|
override |
Definition at line 7352 of file DBHandler.cpp.
References cat(), get_session_ptr(), heavyai::RequestInfo::requestId(), heavyai::RequestInfo::sessionId(), SET_REQUEST_ID, and STDLOG.
|
override |
Definition at line 2911 of file DBHandler.cpp.
References Executor::clearMemory(), Data_Namespace::CPU_LEVEL, get_session_ptr(), anonymous_namespace{DBHandler.cpp}::pause_and_resume_executor_queue(), render_handler_, heavyai::RequestInfo::requestId(), resume_executor_queue(), heavyai::RequestInfo::sessionId(), SET_REQUEST_ID, STDLOG, and THROW_DB_EXCEPTION.
Referenced by alterSystemClear().
|
override |
Definition at line 2887 of file DBHandler.cpp.
References Executor::clearMemory(), get_session_ptr(), getConnectionInfo(), Data_Namespace::GPU_LEVEL, anonymous_namespace{DBHandler.cpp}::pause_and_resume_executor_queue(), render_handler_, heavyai::RequestInfo::requestId(), resume_executor_queue(), heavyai::RequestInfo::sessionId(), SET_REQUEST_ID, STDLOG, THROW_DB_EXCEPTION, and toString().
Referenced by alterSystemClear().
void DBHandler::clearRenderMemory | ( | const TSessionId & | session | ) |
Definition at line 2934 of file DBHandler.cpp.
References get_session_ptr(), getConnectionInfo(), anonymous_namespace{DBHandler.cpp}::pause_and_resume_executor_queue(), render_handler_, heavyai::RequestInfo::requestId(), resume_executor_queue(), heavyai::RequestInfo::sessionId(), SET_REQUEST_ID, STDLOG, THROW_DB_EXCEPTION, and toString().
Referenced by alterSystemClear().
|
override |
Definition at line 768 of file DBHandler.cpp.
References cat(), LeafAggregator::clone_session(), executor_device_type_, get_session_ptr(), getConnectionInfo(), logger::INFO, leaf_aggregator_, LeafAggregator::leafCount(), LOG, heavyai::RequestInfo::requestId(), heavyai::RequestInfo::sessionId(), sessions_store_, SET_REQUEST_ID, STDLOG, THROW_DB_EXCEPTION, toString(), and Catalog_Namespace::UserMetadata::userLoggable().
|
override |
Definition at line 658 of file DBHandler.cpp.
References AccessPrivileges::ACCESS, cat(), connect_impl(), DatabaseDBObjectType, getConnectionInfo(), lockmgr::instance(), DBObject::loadKey(), logger::set_new_request_id(), DBObject::setPrivileges(), STDLOG, super_user_rights_, THROW_DB_EXCEPTION, toString(), and Catalog_Namespace::UserMetadata::userLoggable().
|
private |
Definition at line 694 of file DBHandler.cpp.
References query_state::StdLog::appendNameValuePairs(), executor_device_type_, getConnectionInfo(), query_state::StdLog::getConstSessionInfo(), logger::INFO, lockmgr::instance(), join(), LOG, sessions_store_, query_state::StdLog::setSessionInfo(), super_user_rights_, toString(), and Catalog_Namespace::UserMetadata::userLoggable().
Referenced by connect(), and internal_connect().
|
staticprivate |
Definition at line 1250 of file DBHandler.cpp.
References ExecutionResult::CalciteDdl, convertExplain(), convertResult(), convertRows(), ExecutionResult::empty(), ExecutionResult::Explanation, ExecutionResult::getExecutionTime(), ExecutionResult::getResultType(), ExecutionResult::getRows(), ExecutionResult::getTargetsMeta(), ExecutionResult::QueryResult, and ExecutionResult::SimpleResult.
Referenced by convertResultSet(), get_tables_meta_impl(), sql_execute_local(), and validateRelAlg().
|
staticprivate |
Definition at line 6405 of file DBHandler.cpp.
References createSimpleResult().
Referenced by convertData().
|
staticprivate |
Definition at line 6411 of file DBHandler.cpp.
References createSimpleResult().
Referenced by convertData().
|
private |
Definition at line 7746 of file DBHandler.cpp.
References CHECK, convertData(), create_query_state(), query_state::QueryState::createQueryStateProxy(), Catalog_Namespace::SessionInfo::get_session_id(), get_session_ptr(), and ExecutionResult::getDataPtr().
Referenced by executeDdl().
|
staticprivate |
Definition at line 6313 of file DBHandler.cpp.
References query_state::QueryStateProxy::createTimer(), ThriftSerializers::target_meta_infos_to_thrift(), THROW_DB_EXCEPTION, to_string(), value_to_thrift(), and value_to_thrift_column().
Referenced by convertData().
|
private |
Definition at line 4049 of file DBHandler.cpp.
References import_export::CopyParams::add_metadata_columns, import_export::CopyParams::array_begin, import_export::CopyParams::array_delim, import_export::CopyParams::array_end, CHECK, import_export::CopyParams::connection_string, import_export::CopyParams::credential_string, import_export::CopyParams::delimiter, import_export::CopyParams::dsn, import_export::CopyParams::escape, import_export::CopyParams::geo_coords_comp_param, import_export::CopyParams::geo_coords_encoding, import_export::CopyParams::geo_coords_srid, import_export::CopyParams::geo_coords_type, import_export::CopyParams::geo_explode_collections, import_export::CopyParams::geo_layer_name, import_export::CopyParams::geo_validate_geometry, import_export::CopyParams::has_header, import_export::kAuto, import_export::kAutoDetect, import_export::kDelimitedFile, import_export::kDouble, kENCODING_GEOINT, import_export::kFile, import_export::kFloat, import_export::kGeoFile, kGEOGRAPHY, kGEOMETRY, import_export::kHasHeader, import_export::kInt, import_export::kNoHeader, import_export::kNone, import_export::kOdbc, import_export::kParquetFile, import_export::kPoint, import_export::kRasterFile, import_export::kSmallInt, import_export::kWorld, import_export::CopyParams::line_delim, import_export::CopyParams::null_str, import_export::CopyParams::password, import_export::CopyParams::quote, import_export::CopyParams::quoted, import_export::CopyParams::raster_drop_if_all_null, import_export::CopyParams::raster_import_bands, import_export::CopyParams::raster_import_dimensions, import_export::CopyParams::raster_point_compute_angle, import_export::CopyParams::raster_point_transform, import_export::CopyParams::raster_point_type, import_export::CopyParams::raster_scanlines_per_thread, import_export::CopyParams::s3_access_key, import_export::CopyParams::s3_endpoint, import_export::CopyParams::s3_region, import_export::CopyParams::s3_secret_key, import_export::CopyParams::s3_session_token, import_export::CopyParams::sanitize_column_names, import_export::CopyParams::source_srid, import_export::CopyParams::source_type, import_export::CopyParams::sql_order_by, import_export::CopyParams::sql_select, import_export::CopyParams::threads, import_export::CopyParams::trim_spaces, and import_export::CopyParams::username.
Referenced by detect_column_types(), and importGeoTableSingle().
|
override |
Definition at line 4625 of file DBHandler.cpp.
References check_read_only(), anonymous_namespace{DBHandler.cpp}::create_custom_expr_from_thrift_obj(), custom_expressions_mutex_, get_session_ptr(), getConnectionInfo(), heavyai::RequestInfo::requestId(), heavyai::RequestInfo::sessionId(), SET_REQUEST_ID, STDLOG, THROW_DB_EXCEPTION, and toString().
|
override |
Definition at line 4824 of file DBHandler.cpp.
References cat(), CHECK, dbhandler::check_not_info_schema_db(), check_read_only(), AccessPrivileges::CREATE_DASHBOARD, anonymous_namespace{DBHandler.cpp}::dashboard_exists(), DashboardDBObjectType, DashboardDescriptor::dashboardMetadata, DashboardDescriptor::dashboardName, DashboardDescriptor::dashboardState, g_allow_system_dashboard_update, get_session_ptr(), getConnectionInfo(), DashboardDescriptor::imageHash, lockmgr::instance(), heavyai::RequestInfo::requestId(), heavyai::RequestInfo::sessionId(), SET_REQUEST_ID, STDLOG, THROW_DB_EXCEPTION, toString(), DashboardDescriptor::user, and DashboardDescriptor::userId.
|
private |
Definition at line 5160 of file DBHandler.cpp.
References setup::name, and run_benchmark_import::type.
|
override |
Definition at line 5136 of file DBHandler.cpp.
References cat(), get_session_ptr(), getConnectionInfo(), heavyai::RequestInfo::requestId(), heavyai::RequestInfo::sessionId(), SET_REQUEST_ID, STDLOG, THROW_DB_EXCEPTION, toString(), LinkDescriptor::userId, LinkDescriptor::viewMetadata, and LinkDescriptor::viewState.
|
private |
|
inline |
Definition at line 663 of file DBHandler.h.
References run_benchmark_import::args.
Referenced by convertResultSet(), get_table_details_impl(), get_tables_meta(), sql_execute(), sql_execute_df(), and sql_validate().
|
override |
Definition at line 5191 of file DBHandler.cpp.
References check_read_only(), getConnectionInfo(), ImportHelpers::is_reserved_name(), join(), heavyai::RequestInfo::json(), kENCODING_DATE_IN_DAYS, kENCODING_DICT, kENCODING_FIXED, kENCODING_GEOINT, kENCODING_NONE, logger::request_id(), heavyai::RequestInfo::requestId(), ImportHelpers::sanitize_name(), SET_REQUEST_ID, heavyai::RequestInfo::setRequestId(), sql_execute(), STDLOG, thrift_to_encoding(), thrift_to_encoding_name(), thrift_to_name(), THROW_DB_EXCEPTION, to_string(), and toString().
Referenced by importGeoTableSingle().
|
private |
Definition at line 586 of file DBHandler.cpp.
References calcite_, Catalog_Namespace::CALCITE_SESSION_ID_LENGTH, calcite_sessions_, calcite_sessions_mtx_, CHECK, executor_device_type_, and generate_random_string().
Referenced by processCalciteRequest().
|
staticprivate |
Definition at line 6368 of file DBHandler.cpp.
References CHECK, CHECK_EQ, and run_benchmark_import::label.
Referenced by convertExplain(), and convertResult().
|
override |
Definition at line 1562 of file DBHandler.cpp.
References CPU, data_mgr_, ArrowResultSet::deallocateArrowResultBuffer(), logger::ERROR, get_session_ptr(), GPU, handle_to_dev_ptr_mutex_, ipc_handle_to_dev_ptr_, LOG, heavyai::RequestInfo::requestId(), run_benchmark_import::result, heavyai::RequestInfo::sessionId(), SET_REQUEST_ID, and STDLOG.
|
override |
Definition at line 4678 of file DBHandler.cpp.
References check_read_only(), custom_expressions_mutex_, get_session_ptr(), getConnectionInfo(), heavyai::RequestInfo::requestId(), heavyai::RequestInfo::sessionId(), SET_REQUEST_ID, STDLOG, THROW_DB_EXCEPTION, and toString().
|
override |
Definition at line 4921 of file DBHandler.cpp.
References delete_dashboards().
|
override |
Definition at line 4926 of file DBHandler.cpp.
References cat(), dbhandler::check_not_info_schema_db(), check_read_only(), g_allow_system_dashboard_update, get_session_ptr(), getConnectionInfo(), heavyai::RequestInfo::requestId(), heavyai::RequestInfo::sessionId(), SET_REQUEST_ID, STDLOG, THROW_DB_EXCEPTION, and toString().
Referenced by delete_dashboard().
|
override |
Definition at line 4340 of file DBHandler.cpp.
References anonymous_namespace{DBHandler.cpp}::add_vsi_archive_prefix(), anonymous_namespace{DBHandler.cpp}::add_vsi_geo_prefix(), anonymous_namespace{DBHandler.cpp}::add_vsi_network_prefix(), CHECK, check_geospatial_files(), check_read_only(), copyparams_to_thrift(), encoding_to_thrift(), shared::file_or_glob_path_exists(), import_export::CopyParams::file_sort_order_by, import_export::CopyParams::file_sort_regex, anonymous_namespace{DBHandler.cpp}::find_first_geo_file_in_archive(), import_export::Importer::gdalFileExists(), import_export::Importer::gdalFileOrDirectoryExists(), import_export::Importer::gdalToColumnDescriptors(), import_export::CopyParams::geo_coords_comp_param, import_export::CopyParams::geo_coords_encoding, import_export::CopyParams::geo_coords_srid, import_export::CopyParams::geo_coords_type, import_export::DataStreamSink::get_copy_params(), import_export::Detector::get_headers(), import_export::Detector::get_sample_rows(), get_session_ptr(), import_export::Detector::getBestColumnTypes(), getConnectionInfo(), import_path_, anonymous_namespace{DBHandler.cpp}::is_a_supported_archive_file(), anonymous_namespace{DBHandler.cpp}::is_local_file(), ImportHelpers::is_reserved_name(), shared::kDefaultSampleRowsCount, import_export::kDelimitedFile, Geospatial::kGeoColumnName, import_export::kGeoFile, import_export::kOdbc, import_export::kParquetFile, import_export::kRasterFile, shared::local_glob_filter_sort_files(), anonymous_namespace{DBHandler.cpp}::path_is_relative(), populateThriftColumnType(), import_export::Importer::readMetadataSampleGDAL(), import_export::CopyParams::regex_path_filter, heavyai::RequestInfo::requestId(), import_export::CopyParams::sanitize_column_names, ImportHelpers::sanitize_name(), heavyai::RequestInfo::sessionId(), SET_REQUEST_ID, import_export::CopyParams::source_type, STDLOG, thrift_to_copyparams(), THROW_DB_EXCEPTION, toString(), type_to_thrift(), and anonymous_namespace{DBHandler.cpp}::validate_import_file_path_if_local().
Referenced by importGeoTableSingle().
|
override |
Definition at line 719 of file DBHandler.cpp.
References get_session_ptr(), getConnectionInfo(), heavyai::RequestInfo::requestId(), heavyai::RequestInfo::sessionId(), sessions_store_, SET_REQUEST_ID, STDLOG, and toString().
|
private |
Definition at line 727 of file DBHandler.cpp.
References LeafAggregator::disconnect(), leaf_aggregator_, LeafAggregator::leafCount(), and render_handler_.
Referenced by resetSessionsStore().
|
private |
Definition at line 1820 of file DBHandler.cpp.
References CHECK, and dispatch_queue_.
Referenced by validateRelAlg().
void DBHandler::emergency_shutdown | ( | ) |
Definition at line 7565 of file DBHandler.cpp.
References calcite_.
Referenced by shutdown().
|
private |
Definition at line 6838 of file DBHandler.cpp.
Referenced by sql_execute_impl().
|
override |
Definition at line 7330 of file DBHandler.cpp.
References measure< TimeT >::execution(), logger::INFO, LOG, render_handler_, SET_REQUEST_ID, and THROW_DB_EXCEPTION.
|
override |
Definition at line 7086 of file DBHandler.cpp.
References measure< TimeT >::execution(), logger::INFO, leaf_handler_, LOG, SET_REQUEST_ID, and THROW_DB_EXCEPTION.
|
private |
Definition at line 6206 of file DBHandler.cpp.
References allow_loop_joins_, allow_multifrag_, query_state::QueryStateProxy::createTimer(), Default, measure< TimeT >::execution(), ExecutionResult::Explanation, g_dynamic_watchdog_time_limit, g_enable_columnar_output, g_enable_dynamic_watchdog, g_enable_runtime_query_interrupt, g_enable_watchdog, g_optimize_cuda_block_and_grid_sizes, g_pending_query_interrupt_freq, g_running_query_interrupt_freq, query_state::QueryState::getConstSessionInfo(), ExecutionResult::getExecutionTime(), Executor::getExecutor(), ExecutionResult::getPushedDownFilterInfo(), ExecutionResult::getRows(), SystemParameters::gpu_input_mem_limit, lockmgr::TableSchemaLockMgr::instance(), lockmgr::TableDataLockMgr::instance(), intel_jit_profile_, ExplainInfo::isCalciteExplain(), ExplainInfo::isJustExplain(), ExplainInfo::isOptimizedExplain(), ExplainInfo::isPlanExplain(), ExplainInfo::isVerbose(), jit_debug_, Optimized, ExecutionResult::QueryResult, ExecutionResult::setExecutionTime(), ExecutionResult::setResultType(), system_parameters_, Executor::UNITARY_EXECUTOR_ID, and VLOG.
Referenced by execute_rel_alg_with_filter_push_down(), get_tables_meta_impl(), sql_execute_impl(), and validateRelAlg().
|
private |
Definition at line 6794 of file DBHandler.cpp.
References ExecutionResult::addExecutionTime(), execute_rel_alg(), query_state::QueryState::getQueryStr(), ExplainInfo::None, parse_to_ra(), and system_parameters_.
Referenced by sql_execute_impl().
|
private |
Definition at line 8070 of file DBHandler.cpp.
References alterSession(), alterSystemClear(), DdlCommandExecutor::commandStr(), convertResultSet(), ExecutionResult::empty(), DdlCommandExecutor::execute(), measure< TimeT >::execution(), getQueries(), ExecutionResult::getRows(), DdlCommandExecutor::getSessionParameter(), DdlCommandExecutor::getTargetQuerySessionToKill(), getUserSessions(), interruptQuery(), DdlCommandExecutor::isAlterSessionSet(), DdlCommandExecutor::isAlterSystemClear(), DdlCommandExecutor::isAlterSystemControlExecutorQueue(), DdlCommandExecutor::isKillQuery(), DdlCommandExecutor::isShowQueries(), DdlCommandExecutor::isShowUserSessions(), pause_executor_queue(), read_only_, run_benchmark_import::result, resume_executor_queue(), DdlCommandExecutor::returnCacheType(), and DdlCommandExecutor::returnQueueAction().
Referenced by sql_execute_impl().
|
private |
Definition at line 8127 of file DBHandler.cpp.
References alterSession(), alterSystemClear(), ExecutionResult::CalciteDdl, DdlCommandExecutor::commandStr(), DdlCommandExecutor::execute(), measure< TimeT >::execution(), getQueries(), ExecutionResult::getResultType(), DdlCommandExecutor::getSessionParameter(), DdlCommandExecutor::getTargetQuerySessionToKill(), getUserSessions(), interruptQuery(), DdlCommandExecutor::isAlterSessionSet(), DdlCommandExecutor::isAlterSystemClear(), DdlCommandExecutor::isAlterSystemControlExecutorQueue(), DdlCommandExecutor::isKillQuery(), DdlCommandExecutor::isShowQueries(), DdlCommandExecutor::isShowUserSessions(), pause_executor_queue(), ExecutionResult::QueryResult, read_only_, resume_executor_queue(), DdlCommandExecutor::returnCacheType(), DdlCommandExecutor::returnQueueAction(), ExecutionResult::setExecutionTime(), and ExecutionResult::setResultType().
|
private |
Definition at line 1770 of file DBHandler.cpp.
References get_table_details_impl().
Referenced by get_token_based_completions().
|
private |
Definition at line 3237 of file DBHandler.cpp.
References ColumnDescriptor::columnName, ColumnDescriptor::columnType, Geospatial::GeoTypesFactory::getGeoColumns(), import_export::Importer::set_geo_physical_import_buffer_columnar(), and THROW_DB_EXCEPTION.
Referenced by fillMissingBuffers(), load_table(), load_table_binary_arrow(), and load_table_binary_columnar().
|
private |
Definition at line 3275 of file DBHandler.cpp.
References CHECK, and fillGeoColumns().
Referenced by load_table(), load_table_binary(), load_table_binary_arrow(), and load_table_binary_columnar().
|
private |
Definition at line 6112 of file DBHandler.cpp.
References calcite_sessions_, and calcite_sessions_mtx_.
Referenced by get_session_ptr().
|
override |
Definition at line 2293 of file DBHandler.cpp.
References get_session_ptr(), getAllRolesForUserImpl(), heavyai::RequestInfo::requestId(), heavyai::RequestInfo::sessionId(), SET_REQUEST_ID, and STDLOG.
|
override |
Definition at line 5968 of file DBHandler.cpp.
References anonymous_namespace{DBHandler.cpp}::add_vsi_archive_prefix(), anonymous_namespace{DBHandler.cpp}::add_vsi_network_prefix(), import_export::Importer::gdalFileExists(), import_export::Importer::gdalGetAllFilesInArchive(), get_session_ptr(), getConnectionInfo(), import_path_, anonymous_namespace{DBHandler.cpp}::is_a_supported_archive_file(), anonymous_namespace{DBHandler.cpp}::path_is_relative(), heavyai::RequestInfo::requestId(), heavyai::RequestInfo::sessionId(), SET_REQUEST_ID, STDLOG, thrift_to_copyparams(), THROW_DB_EXCEPTION, toString(), and anonymous_namespace{DBHandler.cpp}::validate_import_file_path_if_local().
|
override |
Definition at line 2281 of file DBHandler.cpp.
References get_session_ptr(), getAllRolesForUserImpl(), heavyai::RequestInfo::requestId(), heavyai::RequestInfo::sessionId(), SET_REQUEST_ID, and STDLOG.
|
override |
Definition at line 1661 of file DBHandler.cpp.
References anonymous_namespace{DBHandler.cpp}::extract_projection_tokens_for_completion(), get_completion_hints_unsorted(), get_session_ptr(), get_uc_compatible_table_names_by_column(), heavyai::RequestInfo::requestId(), heavyai::RequestInfo::sessionId(), SET_REQUEST_ID, gpu_enabled::sort(), STDLOG, and to_upper().
|
private |
Definition at line 1696 of file DBHandler.cpp.
References calcite_, logger::ERROR, GET_PHYSICAL_TABLES_AND_VIEWS, get_tables_impl(), get_token_based_completions(), query_state::StdLog::getConstSessionInfo(), just_whitelisted_keyword_hints(), and LOG.
Referenced by get_completion_hints().
|
override |
Definition at line 4643 of file DBHandler.cpp.
References anonymous_namespace{DBHandler.cpp}::create_thrift_obj_from_custom_expr(), custom_expressions_mutex_, get_session_ptr(), getConnectionInfo(), heavyai::RequestInfo::requestId(), heavyai::RequestInfo::sessionId(), SET_REQUEST_ID, STDLOG, and toString().
|
override |
Definition at line 4698 of file DBHandler.cpp.
References cat(), get_dashboard_impl(), get_session_ptr(), getConnectionInfo(), lockmgr::instance(), is_allowed_on_dashboard(), heavyai::RequestInfo::requestId(), heavyai::RequestInfo::sessionId(), SET_REQUEST_ID, STDLOG, THROW_DB_EXCEPTION, to_string(), toString(), Catalog_Namespace::UserMetadata::userName, and AccessPrivileges::VIEW_DASHBOARD.
|
override |
Definition at line 5090 of file DBHandler.cpp.
References cat(), DashboardPrivileges::CREATE_DASHBOARD, DashboardDBObjectType, DashboardPrivileges::DELETE_DASHBOARD, DashboardPrivileges::EDIT_DASHBOARD, get_session_ptr(), getConnectionInfo(), lockmgr::instance(), heavyai::RequestInfo::requestId(), heavyai::RequestInfo::sessionId(), SET_REQUEST_ID, STDLOG, THROW_DB_EXCEPTION, to_string(), toString(), Catalog_Namespace::UserMetadata::userId, Catalog_Namespace::UserMetadata::userName, and DashboardPrivileges::VIEW_DASHBOARD.
|
private |
Definition at line 4745 of file DBHandler.cpp.
References cat(), DashboardPrivileges::CREATE_DASHBOARD, DashboardDBObjectType, DashboardDescriptor::dashboardId, DashboardDescriptor::dashboardMetadata, DashboardDescriptor::dashboardName, DashboardDescriptor::dashboardState, DashboardPrivileges::DELETE_DASHBOARD, DashboardPrivileges::EDIT_DASHBOARD, DBObject::getPrivileges(), AccessPrivileges::hasPermission(), DashboardDescriptor::imageHash, lockmgr::instance(), DashboardDescriptor::updateTime, DashboardDescriptor::user, DashboardDescriptor::userId, Catalog_Namespace::UserMetadata::userName, and DashboardPrivileges::VIEW_DASHBOARD.
Referenced by get_dashboard(), and get_dashboards().
|
override |
Definition at line 4723 of file DBHandler.cpp.
References cat(), get_dashboard_impl(), get_session_ptr(), getConnectionInfo(), is_allowed_on_dashboard(), heavyai::RequestInfo::requestId(), heavyai::RequestInfo::sessionId(), SET_REQUEST_ID, STDLOG, toString(), Catalog_Namespace::UserMetadata::userName, and AccessPrivileges::VIEW_DASHBOARD.
|
override |
Definition at line 3056 of file DBHandler.cpp.
References get_session_ptr(), getConnectionInfo(), lockmgr::instance(), heavyai::RequestInfo::requestId(), heavyai::RequestInfo::sessionId(), SET_REQUEST_ID, STDLOG, and toString().
|
override |
Definition at line 2162 of file DBHandler.cpp.
References AccessPrivileges::ALL_TABLE, cat(), DashboardDBObjectType, DatabaseDBObjectType, get_session_ptr(), DBObject::getObjectKey(), lockmgr::instance(), DBObject::loadKey(), heavyai::RequestInfo::requestId(), serialize_db_object(), ServerDBObjectType, heavyai::RequestInfo::sessionId(), SET_REQUEST_ID, STDLOG, TableDBObjectType, THROW_DB_EXCEPTION, to_string(), and ViewDBObjectType.
|
override |
Definition at line 2133 of file DBHandler.cpp.
References get_session_ptr(), lockmgr::instance(), heavyai::RequestInfo::requestId(), serialize_db_object(), heavyai::RequestInfo::sessionId(), SET_REQUEST_ID, STDLOG, and THROW_DB_EXCEPTION.
|
override |
Definition at line 7584 of file DBHandler.cpp.
References cpu_mode_only_, EXPOSE_THRIFT_MAP, get_session_ptr(), getConnectionInfo(), report::params, heavyai::RequestInfo::requestId(), heavyai::RequestInfo::sessionId(), SET_REQUEST_ID, STDLOG, and toString().
|
override |
Definition at line 5921 of file DBHandler.cpp.
References anonymous_namespace{DBHandler.cpp}::add_vsi_archive_prefix(), anonymous_namespace{DBHandler.cpp}::add_vsi_network_prefix(), anonymous_namespace{DBHandler.cpp}::find_first_geo_file_in_archive(), import_export::Importer::gdalFileExists(), get_session_ptr(), getConnectionInfo(), import_path_, anonymous_namespace{DBHandler.cpp}::is_a_supported_archive_file(), anonymous_namespace{DBHandler.cpp}::path_is_relative(), heavyai::RequestInfo::requestId(), heavyai::RequestInfo::sessionId(), SET_REQUEST_ID, STDLOG, thrift_to_copyparams(), THROW_DB_EXCEPTION, toString(), and anonymous_namespace{DBHandler.cpp}::validate_import_file_path_if_local().
|
override |
Definition at line 7704 of file DBHandler.cpp.
References ExtensionFunctionsWhitelist::get_ext_funcs(), and ThriftSerializers::to_thrift().
|
override |
Definition at line 7684 of file DBHandler.cpp.
References ExtensionFunctionsWhitelist::get_udfs_name().
|
override |
Definition at line 923 of file DBHandler.cpp.
References data_mgr_, get_session_ptr(), getConnectionInfo(), heavyai::RequestInfo::requestId(), heavyai::RequestInfo::sessionId(), SET_REQUEST_ID, STDLOG, and toString().
|
override |
Definition at line 6119 of file DBHandler.cpp.
References get_session_ptr(), heavyai::RequestInfo::requestId(), heavyai::RequestInfo::sessionId(), SET_REQUEST_ID, STDLOG, and THROW_DB_EXCEPTION.