OmniSciDB  72c90bc290
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ShowRuntimeFunctionsCommand Class Reference

#include <DdlCommandExecutor.h>

+ Inheritance diagram for ShowRuntimeFunctionsCommand:
+ Collaboration diagram for ShowRuntimeFunctionsCommand:

Public Member Functions

 ShowRuntimeFunctionsCommand (const DdlCommandData &ddl_data, std::shared_ptr< Catalog_Namespace::SessionInfo const > session_ptr)
 
ExecutionResult execute (bool read_only_mode) override
 
- Public Member Functions inherited from DdlCommand
 DdlCommand (const DdlCommandData &ddl_data, std::shared_ptr< Catalog_Namespace::SessionInfo const > session_ptr)
 

Additional Inherited Members

- Protected Attributes inherited from DdlCommand
const DdlCommandDataddl_data_
 
std::shared_ptr
< Catalog_Namespace::SessionInfo
const > 
session_ptr_
 

Detailed Description

Definition at line 245 of file DdlCommandExecutor.h.

Constructor & Destructor Documentation

ShowRuntimeFunctionsCommand::ShowRuntimeFunctionsCommand ( const DdlCommandData ddl_data,
std::shared_ptr< Catalog_Namespace::SessionInfo const >  session_ptr 
)

Definition at line 1892 of file DdlCommandExecutor.cpp.

1895  : DdlCommand(ddl_data, session_ptr) {}
DdlCommand(const DdlCommandData &ddl_data, std::shared_ptr< Catalog_Namespace::SessionInfo const > session_ptr)

Member Function Documentation

ExecutionResult ShowRuntimeFunctionsCommand::execute ( bool  read_only_mode)
overridevirtual

Executes the DDL command corresponding to provided JSON payload.

Parameters
_returnresult of DDL command execution (if applicable)

Implements DdlCommand.

Definition at line 1897 of file DdlCommandExecutor.cpp.

References ResultSetLogicalValuesBuilder::create(), genLiteralStr(), ExtensionFunctionsWhitelist::get_udfs_name(), legacylockmgr::getExecuteReadLock(), kTEXT, run_benchmark_import::label, and setup::name.

Referenced by heavydb.cursor.Cursor::executemany().

1897  {
1898  auto execute_read_lock = legacylockmgr::getExecuteReadLock();
1899 
1900  // Get all runtime row-wise functions
1901  std::vector<TargetMetaInfo> label_infos;
1902  std::vector<RelLogicalValues::RowValues> logical_values;
1903 
1904  // label_infos -> column labels
1905  for (const auto& label : {"Runtime Scalar UDF"}) {
1906  label_infos.emplace_back(label, SQLTypeInfo(kTEXT, true));
1907  }
1908 
1909  // logical_values -> table data
1910  for (auto name : ExtensionFunctionsWhitelist::get_udfs_name(/* is_runtime */ true)) {
1911  logical_values.emplace_back(RelLogicalValues::RowValues{});
1912  logical_values.back().emplace_back(genLiteralStr(name));
1913  }
1914 
1915  // Create ResultSet
1916  std::shared_ptr<ResultSet> rSet = std::shared_ptr<ResultSet>(
1917  ResultSetLogicalValuesBuilder::create(label_infos, logical_values));
1918 
1919  return ExecutionResult(rSet, label_infos);
1920 }
auto getExecuteReadLock()
static std::unordered_set< std::string > get_udfs_name(const bool is_runtime)
static ResultSet * create(std::vector< TargetMetaInfo > &label_infos, std::vector< RelLogicalValues::RowValues > &logical_values)
Definition: sqltypes.h:79
static std::unique_ptr< RexLiteral > genLiteralStr(std::string val)
Definition: DBHandler.cpp:7752
std::vector< std::unique_ptr< const RexScalar >> RowValues
Definition: RelAlgDag.h:2656
string name
Definition: setup.in.py:72

+ Here is the call graph for this function:

+ Here is the caller graph for this function:


The documentation for this class was generated from the following files: