OmniSciDB
a5dc49c757
|
#include "DBHandler.h"
#include "DistributedLoader.h"
#include "TokenCompletionHints.h"
#include "MapDRelease.h"
#include "Calcite/Calcite.h"
#include "gen-cpp/CalciteServer.h"
#include "QueryEngine/ErrorHandling.h"
#include "QueryEngine/RelAlgExecutor.h"
#include "Catalog/Catalog.h"
#include "Catalog/DdlCommandExecutor.h"
#include "DataMgr/ForeignStorage/ArrowForeignStorage.h"
#include "DataMgr/ForeignStorage/DummyForeignStorage.h"
#include "DataMgr/ForeignStorage/PassThroughBuffer.h"
#include "DistributedHandler.h"
#include "Fragmenter/InsertOrderFragmenter.h"
#include "Geospatial/ColumnNames.h"
#include "Geospatial/Compression.h"
#include "Geospatial/GDAL.h"
#include "Geospatial/Types.h"
#include "ImportExport/Importer.h"
#include "LockMgr/LockMgr.h"
#include "OSDependent/heavyai_hostname.h"
#include "Parser/ParserWrapper.h"
#include "Parser/ReservedKeywords.h"
#include "QueryEngine/ArrowResultSet.h"
#include "QueryEngine/CalciteAdapter.h"
#include "QueryEngine/Execute.h"
#include "QueryEngine/ExtensionFunctionsWhitelist.h"
#include "QueryEngine/GpuMemUtils.h"
#include "QueryEngine/JoinFilterPushDown.h"
#include "QueryEngine/JsonAccessors.h"
#include "QueryEngine/QueryDispatchQueue.h"
#include "QueryEngine/ResultSetBuilder.h"
#include "QueryEngine/TableFunctions/TableFunctionsFactory.h"
#include "QueryEngine/TableOptimizer.h"
#include "QueryEngine/ThriftSerializers.h"
#include "RequestInfo.h"
#include "Shared/ArrowUtil.h"
#include "Shared/DateTimeParser.h"
#include "Shared/StringTransform.h"
#include "Shared/SysDefinitions.h"
#include "Shared/file_path_util.h"
#include "Shared/heavyai_shared_mutex.h"
#include "Shared/import_helpers.h"
#include "Shared/measure.h"
#include "Shared/misc.h"
#include "Shared/scope.h"
#include "UdfCompiler/UdfCompiler.h"
#include <fcntl.h>
#include <picosha2.h>
#include <sys/types.h>
#include <algorithm>
#include <boost/algorithm/string.hpp>
#include <boost/filesystem.hpp>
#include <boost/make_shared.hpp>
#include <boost/process/search_path.hpp>
#include <boost/program_options.hpp>
#include <boost/tokenizer.hpp>
#include <chrono>
#include <cmath>
#include <csignal>
#include <fstream>
#include <future>
#include <map>
#include <memory>
#include <random>
#include <string>
#include <thread>
#include <typeinfo>
#include <arrow/api.h>
#include <arrow/io/api.h>
#include <arrow/ipc/api.h>
#include "Shared/distributed.h"
Go to the source code of this file.
Classes | |
struct | anonymous_namespace{DBHandler.cpp}::ForceDisconnect |
struct | anonymous_namespace{DBHandler.cpp}::ProjectionTokensForCompletion |
Namespaces | |
anonymous_namespace{DBHandler.cpp} | |
dbhandler | |
Macros | |
#define | INVALID_SESSION_ID "" |
#define | SET_REQUEST_ID(parent_request_id) |
#define | THROW_DB_EXCEPTION(errstr) |
#define | ARROW_THRIFT_THROW_NOT_OK(s) |
#define | THROW_COLUMN_ATTR_MISMATCH_EXCEPTION(attr, got, expected) |
#define | EXPOSE_THRIFT_MAP(TYPENAME) |
Typedefs | |
using | RecordBatchVector = std::vector< std::shared_ptr< arrow::RecordBatch >> |
Variables | |
bool | g_enable_system_tables |
bool | g_allow_system_dashboard_update {false} |
bool | g_uniform_request_ids_per_thrift_call {true} |
bool | g_allow_memory_status_log |
#define ARROW_THRIFT_THROW_NOT_OK | ( | s | ) |
Definition at line 3563 of file DBHandler.cpp.
Referenced by anonymous_namespace{DBHandler.cpp}::loadArrowStream().
#define EXPOSE_THRIFT_MAP | ( | TYPENAME | ) |
Definition at line 7573 of file DBHandler.cpp.
Referenced by DBHandler::get_device_parameters().
#define INVALID_SESSION_ID "" |
Definition at line 131 of file DBHandler.cpp.
Referenced by DBHandler::getInvalidSessionId().
#define SET_REQUEST_ID | ( | parent_request_id | ) |
Definition at line 133 of file DBHandler.cpp.
Referenced by DBHandler::check_table_consistency(), DBHandler::checkpoint(), DBHandler::clear_cpu_memory(), DBHandler::clear_gpu_memory(), DBHandler::clearRenderMemory(), DBHandler::clone_session(), DBHandler::create_custom_expression(), DBHandler::create_dashboard(), DBHandler::create_link(), DBHandler::create_table(), DBHandler::deallocate_df(), DBHandler::delete_custom_expressions(), DBHandler::delete_dashboards(), DBHandler::detect_column_types(), DBHandler::disconnect(), DBHandler::execute_next_render_step(), DBHandler::execute_query_step(), DBHandler::get_all_effective_roles_for_user(), DBHandler::get_all_files_in_archive(), DBHandler::get_all_roles_for_user(), DBHandler::get_completion_hints(), DBHandler::get_custom_expressions(), DBHandler::get_dashboard(), DBHandler::get_dashboard_grantees(), DBHandler::get_dashboards(), DBHandler::get_databases(), DBHandler::get_db_object_privs(), DBHandler::get_db_objects_for_grantee(), DBHandler::get_device_parameters(), DBHandler::get_first_geo_file_in_archive(), DBHandler::get_hardware_info(), DBHandler::get_heap_profile(), DBHandler::get_internal_table_details(), DBHandler::get_internal_table_details_for_database(), DBHandler::get_layers_in_geo_file(), DBHandler::get_license_claims(), DBHandler::get_link_view(), DBHandler::get_memory(), DBHandler::get_physical_tables(), DBHandler::get_queries_info(), DBHandler::get_result_row_for_pixel(), DBHandler::get_roles(), DBHandler::get_server_status(), DBHandler::get_session_info(), DBHandler::get_status(), DBHandler::get_table_details(), DBHandler::get_table_details_for_database(), DBHandler::get_table_epoch(), DBHandler::get_table_epoch_by_name(), DBHandler::get_table_epochs(), DBHandler::get_tables(), DBHandler::get_tables_for_database(), DBHandler::get_tables_meta(), DBHandler::get_users(), DBHandler::get_valid_groups(), DBHandler::get_views(), DBHandler::has_object_privilege(), DBHandler::has_role(), DBHandler::import_geo_table(), DBHandler::import_table(), DBHandler::import_table_status(), DBHandler::insert_chunks(), DBHandler::insert_data(), DBHandler::interrupt(), DBHandler::invalidate_cur_session(), DBHandler::load_table(), DBHandler::load_table_binary(), DBHandler::load_table_binary_arrow(), DBHandler::load_table_binary_columnar(), DBHandler::query_get_outer_fragment_count(), DBHandler::register_runtime_extension_functions(), DBHandler::render_vega(), DBHandler::replace_dashboard(), DBHandler::set_cur_session(), DBHandler::set_execution_mode(), DBHandler::set_license_key(), DBHandler::set_table_epoch(), DBHandler::set_table_epoch_by_name(), DBHandler::set_table_epochs(), DBHandler::share_dashboards(), DBHandler::sql_execute(), DBHandler::sql_execute_df(), DBHandler::sql_execute_gdf(), DBHandler::sql_validate(), DBHandler::start_heap_profile(), DBHandler::start_query(), DBHandler::start_render_query(), DBHandler::stop_heap_profile(), DBHandler::switch_database(), DBHandler::unshare_dashboards(), and DBHandler::update_custom_expression().
#define THROW_COLUMN_ATTR_MISMATCH_EXCEPTION | ( | attr, | |
got, | |||
expected | |||
) |
Definition at line 5398 of file DBHandler.cpp.
Referenced by DBHandler::importGeoTableSingle().
#define THROW_DB_EXCEPTION | ( | errstr | ) |
Definition at line 139 of file DBHandler.cpp.
Referenced by anonymous_namespace{DBHandler.cpp}::add_vsi_network_prefix(), DBHandler::broadcast_serialized_rows(), dbhandler::check_not_info_schema_db(), DBHandler::check_read_only(), DBHandler::check_table_consistency(), DBHandler::check_table_load_privileges(), anonymous_namespace{DBHandler.cpp}::check_valid_column_names(), DBHandler::clear_cpu_memory(), DBHandler::clear_gpu_memory(), DBHandler::clearRenderMemory(), DBHandler::clone_session(), anonymous_namespace{DBHandler.cpp}::column_ids_by_names(), DBHandler::connect(), DBHandler::convertRows(), anonymous_namespace{DBHandler.cpp}::create_custom_expr_from_thrift_obj(), DBHandler::create_custom_expression(), DBHandler::create_dashboard(), DBHandler::create_link(), DBHandler::create_table(), DBHandler::delete_custom_expressions(), DBHandler::delete_dashboards(), DBHandler::detect_column_types(), DBHandler::execute_next_render_step(), DBHandler::execute_query_step(), DBHandler::fillGeoColumns(), DBHandler::get_all_files_in_archive(), DBHandler::get_dashboard(), DBHandler::get_dashboard_grantees(), DBHandler::get_db_object_privs(), DBHandler::get_db_objects_for_grantee(), DBHandler::get_first_geo_file_in_archive(), DBHandler::get_heap_profile(), DBHandler::get_layers_in_geo_file(), DBHandler::get_link_view(), DBHandler::get_result_row_for_pixel(), DBHandler::get_session_ptr(), DBHandler::get_table_details_impl(), DBHandler::get_table_epoch(), DBHandler::get_table_epoch_by_name(), DBHandler::get_tables_impl(), DBHandler::get_tables_meta(), DBHandler::get_tables_meta_impl(), DBHandler::get_valid_groups(), DBHandler::getAllRolesForUserImpl(), DBHandler::has_dashboard_permission(), DBHandler::has_database_permission(), DBHandler::has_object_privilege(), DBHandler::has_role(), DBHandler::has_table_permission(), DBHandler::has_view_permission(), DBHandler::import_table(), DBHandler::importGeoTableSingle(), DBHandler::initialize(), DBHandler::insert_chunks(), DBHandler::insert_data(), DBHandler::internal_connect(), DBHandler::krb5_connect(), DBHandler::load_table(), DBHandler::load_table_binary(), DBHandler::load_table_binary_arrow(), DBHandler::load_table_binary_columnar(), DBHandler::pause_executor_queue(), DBHandler::populateThriftColumnType(), DBHandler::prepare_loader_generic(), DBHandler::query_get_outer_fragment_count(), DBHandler::register_runtime_extension_functions(), DBHandler::render_vega(), DBHandler::replace_dashboard(), DBHandler::resume_executor_queue(), DBHandler::set_license_key(), DBHandler::set_table_epoch(), DBHandler::set_table_epoch_by_name(), DBHandler::set_table_epochs(), DBHandler::shareOrUnshareDashboards(), DBHandler::sql_execute(), DBHandler::sql_execute_df(), DBHandler::sql_execute_impl(), DBHandler::sql_validate(), DBHandler::start_heap_profile(), DBHandler::start_query(), DBHandler::start_render_query(), DBHandler::stop_heap_profile(), DBHandler::switch_database(), DBHandler::thrift_to_copyparams(), DBHandler::update_custom_expression(), DBHandler::validateDashboardIdsForSharing(), and DBHandler::validateGroups().
using RecordBatchVector = std::vector<std::shared_ptr<arrow::RecordBatch>> |
Definition at line 3561 of file DBHandler.cpp.
|
static |
Definition at line 7770 of file DBHandler.cpp.
References kTEXT.
Referenced by anonymous_namespace{DdlCommandExecutor.cpp}::add_table_details(), ShowForeignServersCommand::execute(), ShowCreateServerCommand::execute(), ShowTablesCommand::execute(), ShowDatabasesCommand::execute(), ShowFunctionsCommand::execute(), ShowRuntimeFunctionsCommand::execute(), ShowTableFunctionsCommand::execute(), ShowRuntimeTableFunctionsCommand::execute(), ShowModelsCommand::execute(), ShowModelDetailsCommand::execute(), ShowDiskCacheUsageCommand::execute(), ShowUserDetailsCommand::execute(), ShowRolesCommand::execute(), DBHandler::getQueries(), DBHandler::getUserSessions(), and ShowModelFeatureDetailsCommand::prepareLogicalValues().
std::map<std::string, std::string> get_device_parameters | ( | bool | cpu_only | ) |
Definition at line 970 of file NativeCodegen.cpp.
|
static |
Definition at line 4565 of file DBHandler.cpp.
References DashboardDBObjectType, Catalog_Namespace::SessionInfo::get_currentUser(), Catalog_Namespace::SessionInfo::getCatalog(), and lockmgr::instance().
Referenced by DBHandler::get_dashboard(), DBHandler::get_dashboards(), and DBHandler::replace_dashboard().
|
static |
Definition at line 1919 of file DBHandler.cpp.
References DatabasePrivileges::ACCESS, ServerPrivileges::ALTER_SERVER, TablePrivileges::ALTER_TABLE, CHECK, DashboardPrivileges::CREATE_DASHBOARD, DatabasePrivileges::CREATE_DATABASE, ServerPrivileges::CREATE_SERVER, TablePrivileges::CREATE_TABLE, ViewPrivileges::CREATE_VIEW, DashboardDBObjectType, DatabaseDBObjectType, DashboardPrivileges::DELETE_DASHBOARD, TablePrivileges::DELETE_FROM_TABLE, ViewPrivileges::DELETE_FROM_VIEW, DatabasePrivileges::DROP_DATABASE, ServerPrivileges::DROP_SERVER, TablePrivileges::DROP_TABLE, ViewPrivileges::DROP_VIEW, DashboardPrivileges::EDIT_DASHBOARD, DBObject::getName(), DBObject::getObjectKey(), DBObject::getPrivileges(), DBObject::getType(), TablePrivileges::INSERT_INTO_TABLE, ViewPrivileges::INSERT_INTO_VIEW, DBObjectKey::objectId, DBObjectKey::permissionType, TablePrivileges::SELECT_FROM_TABLE, ViewPrivileges::SELECT_FROM_VIEW, ServerPrivileges::SERVER_USAGE, ServerDBObjectType, TableDBObjectType, TablePrivileges::TRUNCATE_TABLE, run_benchmark_import::type, TablePrivileges::UPDATE_IN_TABLE, ViewPrivileges::UPDATE_IN_VIEW, DashboardPrivileges::VIEW_DASHBOARD, DatabasePrivileges::VIEW_SQL_EDITOR, and ViewDBObjectType.
Referenced by DBHandler::get_db_object_privs(), and DBHandler::get_db_objects_for_grantee().
bool g_allow_memory_status_log |
Definition at line 127 of file Execute.cpp.
bool g_allow_system_dashboard_update {false} |
Definition at line 124 of file DBHandler.cpp.
Referenced by DBHandler::create_dashboard(), DBHandler::delete_dashboards(), and DBHandler::replace_dashboard().
bool g_enable_system_tables |
Definition at line 64 of file SysCatalog.cpp.
bool g_uniform_request_ids_per_thrift_call {true} |
Definition at line 125 of file DBHandler.cpp.
Referenced by CommandLineOptions::fillOptions().