OmniSciDB  c0231cc57d
 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 192 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 1657 of file DdlCommandExecutor.cpp.

1660  : 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 1662 of file DdlCommandExecutor.cpp.

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

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

1662  {
1663  // Get all runtime row-wise functions
1664  std::vector<TargetMetaInfo> label_infos;
1665  std::vector<RelLogicalValues::RowValues> logical_values;
1666 
1667  // label_infos -> column labels
1668  for (const auto& label : {"Runtime Scalar UDF"}) {
1669  label_infos.emplace_back(label, SQLTypeInfo(kTEXT, true));
1670  }
1671 
1672  // logical_values -> table data
1673  for (auto name : ExtensionFunctionsWhitelist::get_udfs_name(/* is_runtime */ true)) {
1674  logical_values.emplace_back(RelLogicalValues::RowValues{});
1675  logical_values.back().emplace_back(genLiteralStr(name));
1676  }
1677 
1678  // Create ResultSet
1679  std::shared_ptr<ResultSet> rSet = std::shared_ptr<ResultSet>(
1680  ResultSetLogicalValuesBuilder::create(label_infos, logical_values));
1681 
1682  return ExecutionResult(rSet, label_infos);
1683 }
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:66
static std::unique_ptr< RexLiteral > genLiteralStr(std::string val)
Definition: DBHandler.cpp:7263
std::vector< std::unique_ptr< const RexScalar >> RowValues
Definition: RelAlgDag.h:2226
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: