OmniSciDB  340b00dbf6
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
ExtensionFunctionsWhitelist.h File Reference
#include <string>
#include <unordered_map>
#include <unordered_set>
#include <vector>
#include "Shared/sqltypes.h"
#include "Shared/toString.h"
+ Include dependency graph for ExtensionFunctionsWhitelist.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  ExtensionFunction
 
class  ExtensionFunctionsWhitelist
 

Enumerations

enum  ExtArgumentType {
  ExtArgumentType::Int8, ExtArgumentType::Int16, ExtArgumentType::Int32, ExtArgumentType::Int64,
  ExtArgumentType::Float, ExtArgumentType::Double, ExtArgumentType::Void, ExtArgumentType::PInt8,
  ExtArgumentType::PInt16, ExtArgumentType::PInt32, ExtArgumentType::PInt64, ExtArgumentType::PFloat,
  ExtArgumentType::PDouble, ExtArgumentType::PBool, ExtArgumentType::Bool, ExtArgumentType::ArrayInt8,
  ExtArgumentType::ArrayInt16, ExtArgumentType::ArrayInt32, ExtArgumentType::ArrayInt64, ExtArgumentType::ArrayFloat,
  ExtArgumentType::ArrayDouble, ExtArgumentType::ArrayBool, ExtArgumentType::GeoPoint, ExtArgumentType::GeoLineString,
  ExtArgumentType::Cursor, ExtArgumentType::GeoPolygon, ExtArgumentType::GeoMultiPolygon, ExtArgumentType::ColumnInt8,
  ExtArgumentType::ColumnInt16, ExtArgumentType::ColumnInt32, ExtArgumentType::ColumnInt64, ExtArgumentType::ColumnFloat,
  ExtArgumentType::ColumnDouble, ExtArgumentType::ColumnBool
}
 

Functions

SQLTypeInfo ext_arg_type_to_type_info (const ExtArgumentType ext_arg_type)
 
std::string toString (const ExtArgumentType &sig_type)
 

Enumeration Type Documentation

enum ExtArgumentType
strong
Enumerator
Int8 
Int16 
Int32 
Int64 
Float 
Double 
Void 
PInt8 
PInt16 
PInt32 
PInt64 
PFloat 
PDouble 
PBool 
Bool 
ArrayInt8 
ArrayInt16 
ArrayInt32 
ArrayInt64 
ArrayFloat 
ArrayDouble 
ArrayBool 
GeoPoint 
GeoLineString 
Cursor 
GeoPolygon 
GeoMultiPolygon 
ColumnInt8 
ColumnInt16 
ColumnInt32 
ColumnInt64 
ColumnFloat 
ColumnDouble 
ColumnBool 

Definition at line 36 of file ExtensionFunctionsWhitelist.h.

Function Documentation

SQLTypeInfo ext_arg_type_to_type_info ( const ExtArgumentType  ext_arg_type)

Definition at line 210 of file ExtensionFunctionsWhitelist.cpp.

References ArrayBool, ArrayDouble, ArrayFloat, ArrayInt16, ArrayInt32, ArrayInt64, ArrayInt8, Bool, ColumnBool, ColumnDouble, ColumnFloat, ColumnInt16, ColumnInt32, ColumnInt64, ColumnInt8, Double, Float, Int16, Int32, Int64, Int8, kARRAY, kBIGINT, kBOOLEAN, kCOLUMN, kDOUBLE, kFLOAT, kINT, kNULLT, kSMALLINT, kTINYINT, LOG, anonymous_namespace{ExtensionFunctionsWhitelist.cpp}::serialize_type(), and logger::WARNING.

Referenced by bind_function(), ExtensionFunctionsWhitelist::get_ext_funcs(), anonymous_namespace{ExtensionFunctionsBinding.cpp}::match_arguments(), and RelAlgTranslator::translateFunction().

210  {
211  /* This function is mostly used for scalar types.
212  For non-scalar types, NULL is returned as a placeholder.
213  */
214 
215  auto generate_array_type = [](const auto subtype) {
216  auto ti = SQLTypeInfo(kARRAY, false);
217  ti.set_subtype(subtype);
218  return ti;
219  };
220 
221  auto generate_column_type = [](const auto subtype) {
222  auto ti = SQLTypeInfo(kCOLUMN, false);
223  ti.set_subtype(subtype);
224  return ti;
225  };
226 
227  switch (ext_arg_type) {
229  return SQLTypeInfo(kBOOLEAN, false);
231  return SQLTypeInfo(kTINYINT, false);
233  return SQLTypeInfo(kSMALLINT, false);
235  return SQLTypeInfo(kINT, false);
237  return SQLTypeInfo(kBIGINT, false);
239  return SQLTypeInfo(kFLOAT, false);
241  return SQLTypeInfo(kDOUBLE, false);
243  return generate_array_type(kTINYINT);
245  return generate_array_type(kSMALLINT);
247  return generate_array_type(kINT);
249  return generate_array_type(kBIGINT);
251  return generate_array_type(kFLOAT);
253  return generate_array_type(kDOUBLE);
255  return generate_array_type(kBOOLEAN);
257  return generate_column_type(kTINYINT);
259  return generate_column_type(kSMALLINT);
261  return generate_column_type(kINT);
263  return generate_column_type(kBIGINT);
265  return generate_column_type(kFLOAT);
267  return generate_column_type(kDOUBLE);
269  return generate_column_type(kBOOLEAN);
270  default:
271  LOG(WARNING) << "ExtArgumentType `" << serialize_type(ext_arg_type)
272  << "` cannot be converted to SQLTypeInfo. Returning nulltype.";
273  }
274  return SQLTypeInfo(kNULLT, false);
275 }
#define LOG(tag)
Definition: Logger.h:188
std::string serialize_type(const ExtArgumentType type, bool byval=true)
Definition: sqltypes.h:47

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

std::string toString ( const ExtArgumentType sig_type)

Definition at line 650 of file ExtensionFunctionsWhitelist.cpp.

References ExtensionFunctionsWhitelist::toString().

Referenced by anonymous_namespace{SerializeToSql.cpp}::agg_to_string(), DBHandler::clear_cpu_memory(), DBHandler::clear_gpu_memory(), DBHandler::clone_session(), WindowFunctionContext::computePartition(), DBHandler::connect(), DBHandler::connect_impl(), DBHandler::create_dashboard(), DBHandler::create_link(), DBHandler::create_table(), DBHandler::delete_dashboards(), DBHandler::detect_column_types(), DBHandler::disconnect(), DBHandler::get_all_files_in_archive(), DBHandler::get_dashboard(), DBHandler::get_dashboard_grantees(), DBHandler::get_dashboards(), DBHandler::get_databases(), DBHandler::get_first_geo_file_in_archive(), DBHandler::get_hardware_info(), DBHandler::get_internal_table_details(), DBHandler::get_layers_in_geo_file(), DBHandler::get_link_view(), anonymous_namespace{TableFunctionCompilationContext.cpp}::get_llvm_type_from_sql_column_type(), DBHandler::get_memory(), DBHandler::get_physical_tables(), DBHandler::get_result_row_for_pixel(), DBHandler::get_server_status(), DBHandler::get_session_info(), DBHandler::get_status(), DBHandler::get_table_details(), DBHandler::get_table_epoch(), DBHandler::get_table_epoch_by_name(), DBHandler::get_table_epochs(), DBHandler::get_tables(), DBHandler::get_tables_meta(), DBHandler::get_users(), DBHandler::get_views(), com.mapd.calcite.parser.MapDParser::getPlanner(), DBHandler::import_geo_table(), DBHandler::import_table(), DBHandler::import_table_status(), DBHandler::interrupt(), DBHandler::load_table(), DBHandler::load_table_binary(), DBHandler::load_table_binary_columnar(), com.omnisci.jdbc.OmniSciConnection::manageConnection(), org.apache.calcite.rel.rules.OuterJoinOptViaNullRejectionRule::onMatch(), operator<<(), ra_exec_unit_desc_for_caching(), DBHandler::render_vega(), DBHandler::replace_dashboard(), DBHandler::set_execution_mode(), DBHandler::set_table_epoch(), DBHandler::set_table_epoch_by_name(), DBHandler::set_table_epochs(), com.omnisci.jdbc.OmniSciConnection::setSession(), DBHandler::shareOrUnshareDashboards(), DBHandler::sql_execute(), DBHandler::sql_validate(), DBHandler::switch_database(), RexSubQuery::toString(), and ScalarExprToSql::visitWindowFunction().

650  {
651  return ExtensionFunctionsWhitelist::toString(sig_type);
652 }
static std::string toString(const std::vector< ExtensionFunction > &ext_funcs, std::string tab="")

+ Here is the call graph for this function: