OmniSciDB  21ac014ffc
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
StringTransform.cpp File Reference
#include "StringTransform.h"
#include "Logger/Logger.h"
#include <boost/algorithm/string/classification.hpp>
#include <boost/algorithm/string/split.hpp>
#include <numeric>
#include <random>
#include <regex>
#include <boost/filesystem.hpp>
#include <iomanip>
+ Include dependency graph for StringTransform.cpp:

Go to the source code of this file.

Functions

void apply_shim (std::string &result, const boost::regex &reg_expr, const std::function< void(std::string &, const boost::smatch &)> &shim_fn)
 
std::vector< std::pair< size_t,
size_t > > 
find_string_literals (const std::string &query)
 
std::string hide_sensitive_data_from_query (std::string const &query_str)
 
template<>
std::string to_string (char const *&&v)
 
template<>
std::string to_string (std::string &&v)
 
std::string generate_random_string (const size_t len)
 
std::vector< std::string > split (std::string_view str, std::string_view delim, std::optional< size_t > maxsplit)
 split apart a string into a vector of substrings More...
 
std::string strip (std::string_view str)
 trim any whitespace from the left and right ends of a string More...
 
std::optional< size_t > inside_string_literal (const size_t start, const size_t length, const std::vector< std::pair< size_t, size_t >> &literal_positions)
 
bool remove_unquoted_newlines_linefeeds_and_tabs_from_sql_string (std::string &str) noexcept
 sanitize an SQL string More...
 
std::string get_quoted_string (const std::string &filename, char quote, char escape)
 Quote a string while escaping any existing quotes in the string. More...
 
std::string simple_sanitize (const std::string &str)
 simple sanitize string (replace control characters with space) More...
 

Function Documentation

void apply_shim ( std::string &  result,
const boost::regex &  reg_expr,
const std::function< void(std::string &, const boost::smatch &)> &  shim_fn 
)

Definition at line 32 of file StringTransform.cpp.

References find_string_literals(), and inside_string_literal().

Referenced by QueryRunner::apply_copy_to_shim(), DBHandler::apply_copy_to_shim(), and anonymous_namespace{CalciteAdapter.cpp}::pg_shim_impl().

34  {
35  boost::smatch what;
36  std::vector<std::pair<size_t, size_t>> lit_pos = find_string_literals(result);
37  auto start_it = result.cbegin();
38  auto end_it = result.cend();
39  while (true) {
40  if (!boost::regex_search(start_it, end_it, what, reg_expr)) {
41  break;
42  }
43  const auto next_start =
44  inside_string_literal(what.position(), what.length(), lit_pos);
45  if (next_start) {
46  start_it = result.cbegin() + *next_start;
47  } else {
48  shim_fn(result, what);
49  lit_pos = find_string_literals(result);
50  start_it = result.cbegin();
51  end_it = result.cend();
52  }
53  }
54 }
std::vector< std::pair< size_t, size_t > > find_string_literals(const std::string &query)
std::optional< size_t > inside_string_literal(const size_t start, const size_t length, const std::vector< std::pair< size_t, size_t >> &literal_positions)

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

std::vector<std::pair<size_t, size_t> > find_string_literals ( const std::string &  query)

Definition at line 56 of file StringTransform.cpp.

References CHECK_GT, LOG, and logger::WARNING.

Referenced by apply_shim().

56  {
57  boost::regex literal_string_regex{R"(([^']+)('(?:[^']+|'')+'))", boost::regex::perl};
58  boost::smatch what;
59  auto it = query.begin();
60  auto prev_it = it;
61  std::vector<std::pair<size_t, size_t>> positions;
62  while (true) {
63  try {
64  if (!boost::regex_search(it, query.end(), what, literal_string_regex)) {
65  break;
66  }
67  } catch (const std::exception& e) {
68  LOG(WARNING) << "Error processing literals: " << e.what()
69  << "\nContinuing query parse...";
70  // boost::regex throws an exception about the complexity of matching when
71  // the wrong type of quotes are used or they're mismatched. Let the query
72  // through unmodified, the parser will throw a much more informative error.
73  // This can also throw on very long queries
74  break;
75  }
76  CHECK_GT(what[1].length(), 0);
77  prev_it = it;
78  it += what.length();
79  positions.emplace_back(prev_it + what[1].length() - query.begin(),
80  it - query.begin());
81  }
82  return positions;
83 }
#define LOG(tag)
Definition: Logger.h:200
#define CHECK_GT(x, y)
Definition: Logger.h:218

+ Here is the caller graph for this function:

std::string generate_random_string ( const size_t  len)

Definition at line 110 of file StringTransform.cpp.

References i.

Referenced by DBHandler::create_new_session(), DBHandler::createInMemoryCalciteSession(), Catalog_Namespace::SysCatalog::syncUserWithRemoteProvider(), and Catalog_Namespace::SysCatalog::updateBlankPasswordsToRandom().

110  {
111  static char charset[] =
112  "0123456789"
113  "abcdefghijklmnopqrstuvwxyz"
114  "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
115 
116  static std::mt19937 prng{std::random_device{}()};
117  static std::uniform_int_distribution<size_t> dist(0, strlen(charset) - 1);
118 
119  std::string str;
120  str.reserve(len);
121  for (size_t i = 0; i < len; i++) {
122  str += charset[dist(prng)];
123  }
124  return str;
125 }

+ Here is the caller graph for this function:

std::string get_quoted_string ( const std::string &  filename,
char  quote,
char  escape 
)

Quote a string while escaping any existing quotes in the string.

Definition at line 244 of file StringTransform.cpp.

Referenced by TableArchiver::dumpTable(), Catalog_Namespace::Catalog::quoteIfRequired(), TableArchiver::restoreTable(), and anonymous_namespace{TableArchiver.cpp}::simple_file_cat().

244  {
245  std::stringstream ss;
246  ss << std::quoted(filename, quote, escape); // TODO: prevents string_view Jun 2020
247  return ss.str();
248 }
std::string filename(char const *path)
Definition: Logger.cpp:64

+ Here is the caller graph for this function:

std::string hide_sensitive_data_from_query ( std::string const query_str)

Definition at line 85 of file StringTransform.cpp.

References gpu_enabled::accumulate().

Referenced by query_state::StdLog::log().

85  {
86  constexpr std::regex::flag_type flags =
87  std::regex::ECMAScript | std::regex::icase | std::regex::optimize;
88  static const std::initializer_list<std::pair<std::regex, std::string>> rules{
89  {std::regex(
90  R"(\b((?:password|s3_access_key|s3_secret_key|s3_session_token|username|credential_string)\s*=\s*)'.+?')",
91  flags),
92  "$1'XXXXXXXX'"},
93  {std::regex(R"((\\set_license\s+)\S+)", flags), "$1XXXXXXXX"}};
94  return std::accumulate(
95  rules.begin(), rules.end(), query_str, [](auto& str, auto& rule) {
96  return std::regex_replace(str, rule.first, rule.second);
97  });
98 }
DEVICE auto accumulate(ARGS &&...args)
Definition: gpu_enabled.h:42

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

std::optional<size_t> inside_string_literal ( const size_t  start,
const size_t  length,
const std::vector< std::pair< size_t, size_t >> &  literal_positions 
)

Definition at line 189 of file StringTransform.cpp.

Referenced by apply_shim().

192  {
193  const auto end = start + length;
194  for (const auto& literal_position : literal_positions) {
195  if (literal_position.first <= start && end <= literal_position.second) {
196  return literal_position.second;
197  }
198  }
199  return std::nullopt;
200 }

+ Here is the caller graph for this function:

bool remove_unquoted_newlines_linefeeds_and_tabs_from_sql_string ( std::string &  str)
noexcept

sanitize an SQL string

Definition at line 204 of file StringTransform.cpp.

205  {
206  char inside_quote = 0;
207  bool previous_c_was_backslash = false;
208  for (auto& c : str) {
209  // if this character is a quote of either type
210  if (c == '\'' || c == '\"') {
211  // ignore if previous character was a backslash
212  if (!previous_c_was_backslash) {
213  // start or end of a quoted region
214  if (inside_quote == c) {
215  // end region
216  inside_quote = 0;
217  } else if (inside_quote == 0) {
218  // start region
219  inside_quote = c;
220  }
221  }
222  } else if (inside_quote == 0) {
223  // outside quoted region
224  if (c == '\n' || c == '\t' || c == '\r') {
225  // replace these with space
226  c = ' ';
227  }
228  // otherwise leave alone, including quotes of a different type
229  }
230  // handle backslashes, except for double backslashes
231  if (c == '\\') {
232  previous_c_was_backslash = !previous_c_was_backslash;
233  } else {
234  previous_c_was_backslash = false;
235  }
236  }
237  // if we didn't end a region, there were unclosed or mixed-nested quotes
238  // accounting for backslashes should mean that this should only be the
239  // case with truly malformed strings which Calcite will barf on anyway
240  return (inside_quote == 0);
241 }
std::string simple_sanitize ( const std::string &  str)

simple sanitize string (replace control characters with space)

Definition at line 252 of file StringTransform.cpp.

252  {
253  auto sanitized_str{str};
254  for (auto& c : sanitized_str) {
255  c = (c < 32) ? ' ' : c;
256  }
257  return sanitized_str;
258 }
std::vector<std::string> split ( std::string_view  str,
std::string_view  delim,
std::optional< size_t >  maxsplit 
)

split apart a string into a vector of substrings

Definition at line 131 of file StringTransform.cpp.

References i, and run_benchmark_import::result.

Referenced by anonymous_namespace{TableArchiver.cpp}::adjust_altered_table_files(), create_table.SyntheticTable::createDataAndImportTable(), Parser::AlterTableStmt::delegateExecute(), com.omnisci.jdbc.OmniSciStatement::executeQuery(), anonymous_namespace{DBHandler.cpp}::extract_projection_tokens_for_completion(), generate_TableFunctionsFactory_init::find_signatures(), get_qualified_column_hints(), QueryPlanDagExtractor::handleTranslatedJoin(), AutomaticIRMetadataGuard::makeBaseFilename(), AutomaticIRMetadataGuard::makeQueryEngineFilename(), TrackingProcessor::process(), Data_Namespace::ProcMeminfoParser::ProcMeminfoParser(), run_benchmark::read_query_files(), TableArchiver::restoreTable(), QueryRunner::QueryRunner::runMultipleStatements(), Parser::splitObjectHierName(), and com.mapd.parser.server.ExtensionFunctionSignatureParser::toSignature().

133  {
134  std::vector<std::string> result;
135 
136  // Use an explicit delimiter.
137  if (!delim.empty()) {
138  std::string::size_type i = 0, j = 0;
139  while ((i = str.find(delim, i)) != std::string::npos &&
140  (!maxsplit || result.size() < maxsplit.value())) {
141  result.emplace_back(str, j, i - j);
142  i += delim.size();
143  j = i;
144  }
145  result.emplace_back(str, j, std::string::npos);
146  return result;
147 
148  // Treat any number of consecutive whitespace characters as a delimiter.
149  } else {
150  bool prev_ws = true;
151  std::string::size_type i = 0, j = 0;
152  for (; i < str.size(); ++i) {
153  if (prev_ws) {
154  if (!isspace(str[i])) {
155  // start of word
156  prev_ws = false;
157  j = i;
158  }
159  } else {
160  if (isspace(str[i])) {
161  // start of space
162  result.emplace_back(str, j, i - j);
163  prev_ws = true;
164  j = i;
165  if ((maxsplit && result.size() == maxsplit.value())) {
166  // stop early if maxsplit was reached
167  result.emplace_back(str, j, std::string::npos);
168  return result;
169  }
170  }
171  }
172  }
173  if (!prev_ws) {
174  result.emplace_back(str, j, std::string::npos);
175  }
176  return result;
177  }
178 }

+ Here is the caller graph for this function:

std::string strip ( std::string_view  str)

trim any whitespace from the left and right ends of a string

Definition at line 180 of file StringTransform.cpp.

References i.

Referenced by generate_TableFunctionsFactory_init.Bracket::parse(), Data_Namespace::ProcMeminfoParser::ProcMeminfoParser(), QueryRunner::QueryRunner::runMultipleStatements(), and DBHandler::sql_execute_impl().

180  {
181  std::string::size_type i, j;
182  for (i = 0; i < str.size() && std::isspace(str[i]); ++i) {
183  }
184  for (j = str.size(); j > i && std::isspace(str[j - 1]); --j) {
185  }
186  return std::string(str.substr(i, j - i));
187 }

+ Here is the caller graph for this function:

template<>
std::string to_string ( char const *&&  v)

Definition at line 101 of file StringTransform.cpp.

Referenced by lockmgr::TableSchemaLockContainer< ReadLock >::acquireTableDescriptor(), lockmgr::TableSchemaLockContainer< WriteLock >::acquireTableDescriptor(), import_export::TypedImportBuffer::add_value(), Catalog_Namespace::Catalog::addColumn(), Catalog_Namespace::Catalog::addFrontendViewToMapNoLock(), Catalog_Namespace::Catalog::addLinkToMap(), Catalog_Namespace::Catalog::addReferenceToForeignDict(), CgenState::addStringConstant(), anonymous_namespace{TableArchiver.cpp}::adjust_altered_table_files(), anonymous_namespace{TargetExprBuilder.cpp}::agg_fn_base_names(), Catalog_Namespace::Catalog::alterPhysicalTableMetadata(), Catalog_Namespace::SysCatalog::alterUser(), query_state::StdLog::appendNameValuePairs(), foreign_storage::LazyParquetChunkLoader::appendRowGroups(), Archive::archive_error(), import_export::QueryExporterGDAL::beginExport(), Catalog_Namespace::Catalog::buildMaps(), Catalog_Namespace::SysCatalog::buildObjectDescriptorMap(), ResultSetReductionJIT::cacheKey(), Catalog_Namespace::Catalog::changeForeignServerOwner(), anonymous_namespace{DBETypes.cpp}::checkColumnRange(), foreign_storage::SingleFileReader::checkForMoreRows(), anonymous_namespace{Execute.cpp}::checkWorkUnitWatchdog(), anonymous_namespace{GpuSharedMemoryUtils.cpp}::codegen_smem_dest_slot_ptr(), GroupByAndAggregate::codegenAggColumnPtr(), TargetExprCodegen::codegenAggregate(), CodeGenerator::codegenArrayAt(), CodeGenerator::codegenHoistedConstantsLoads(), CodeGenerator::codegenHoistedConstantsPlaceholders(), BaselineJoinHashTable::codegenMatchingSet(), OverlapsJoinHashTable::codegenMatchingSet(), GroupByAndAggregate::codegenOutputSlot(), BaselineJoinHashTable::codegenSlot(), CodeGenerator::codgenAdjustFixedEncNull(), CodeGenerator::colByteStream(), UdfCompiler::compileToLLVMIR(), BloscCompressor::compress(), Geospatial::compress_coords(), anonymous_namespace{OverlapsJoinHashTable.cpp}::compute_bucket_sizes(), DBHandler::convertRows(), File_Namespace::FileMgr::coreInit(), DBHandler::create_dashboard(), create_dev_group_by_buffers(), DBHandler::create_table(), Catalog_Namespace::Catalog::createCustomExpression(), Catalog_Namespace::Catalog::createDashboard(), Catalog_Namespace::Catalog::createDashboardSystemRoles(), Catalog_Namespace::SysCatalog::createDatabase(), Catalog_Namespace::Catalog::createForeignServerNoLocks(), Catalog_Namespace::Catalog::createLink(), Catalog_Namespace::Catalog::createTable(), RelAlgExecutor::createTableFunctionWorkUnit(), Catalog_Namespace::SysCatalog::createUser(), anonymous_namespace{ArrowImporter.h}::data_conversion_error(), DatumToString(), ArrowResultSet::deallocateArrowResultBuffer(), BloscCompressor::decompress(), Catalog_Namespace::Catalog::delDictionary(), Catalog_Namespace::Catalog::deleteCustomExpressions(), Catalog_Namespace::Catalog::deleteMetadataForDashboards(), Catalog_Namespace::SysCatalog::deleteObjectDescriptorMap(), Catalog_Namespace::anonymous_namespace{SysCatalog.cpp}::deleteObjectPrivileges(), DecimalOverflowValidator::do_validate(), Catalog_Namespace::Catalog::dropColumn(), Catalog_Namespace::SysCatalog::dropDatabase(), Catalog_Namespace::Catalog::dropForeignServer(), Catalog_Namespace::Catalog::dropTable(), Catalog_Namespace::SysCatalog::dropUser(), ChunkMetadata::dump(), Catalog_Namespace::Catalog::dumpCreateTable(), Catalog_Namespace::Catalog::dumpSchema(), TableArchiver::dumpTable(), anonymous_namespace{ResultSetReductionJIT.cpp}::emit_write_projection(), FixedLengthEncoder< T, V >::encodeDataAndUpdateStats(), anonymous_namespace{ArrowImporter.h}::error_context(), CudaMgr_Namespace::errorMessage(), ShowUserDetailsCommand::execute(), Parser::CopyTableStmt::execute(), Catalog_Namespace::Catalog::executeDropTableSqliteQueries(), RelAlgExecutor::executeRelAlgQueryNoRetry(), RelAlgExecutor::executeSimpleInsert(), File_Namespace::FileMgr::FileMgr(), import_export::delimited_parser::find_end(), ProxyTHttpClient::flush(), Geospatial::anonymous_namespace{GDAL.cpp}::gdal_error_handler(), anonymous_namespace{JoinLoopTest.cpp}::generate_descriptors(), UdfCompiler::generateAST(), TableFunctionCompilationContext::generateEntryPoint(), Catalog_Namespace::Catalog::generatePhysicalTableName(), Parser::anonymous_namespace{ParserNode.cpp}::generateUniqueTableName(), Geospatial::GeoPoint::GeoPoint(), anonymous_namespace{ArrowResultSetConverter.cpp}::get_arrow_type(), DBHandler::get_dashboard(), DBHandler::get_dashboard_grantees(), File_Namespace::get_data_file_path(), DateTimeUtils::get_dateadd_high_precision_adjusted_scale(), DateTimeUtils::get_dateadd_timestamp_precision_scale(), DBHandler::get_db_object_privs(), DateTimeUtils::get_extract_timestamp_precision_scale(), import_export::Detector::get_headers(), DBHandler::get_link_view(), get_nvidia_compute_capability(), ThriftClientConnection::get_protocol(), HitTestTypes::get_rowid_regex(), anonymous_namespace{Execute.cpp}::get_table_name(), DateTimeUtils::get_timestamp_precision_scale(), SQLTypeInfo::get_type_name(), DBHandler::get_valid_groups(), getArrowImportType(), Fragmenter_Namespace::InsertOrderFragmenter::getChunkMetadata(), Parser::LocalConnector::getColumnDescriptors(), getCurrentStackTrace(), Catalog_Namespace::Catalog::getCustomExpressionFromStorage(), CudaMgr_Namespace::CudaMgr::getDeviceProperties(), RelAlgExecutor::getErrorMessageFromCode(), Catalog_Namespace::Catalog::getForeignServersForUser(), Catalog_Namespace::Catalog::getForeignTableFromStorage(), Catalog_Namespace::SysCatalog::getGranteesOfSharedDashboards(), Catalog_Namespace::Catalog::getMetadataForDashboard(), Catalog_Namespace::SysCatalog::getMetadataForDBById(), Catalog_Namespace::SysCatalog::getMetadataForObject(), Catalog_Namespace::SysCatalog::getMetadataForUserById(), Catalog_Namespace::SysCatalog::getMetadataWithDefaultDB(), foreign_storage::IntegralFixedLengthBoundsValidator< T >::getMinMaxBoundsAsStrings(), foreign_storage::FloatPointValidator< T >::getMinMaxBoundsAsStrings(), Catalog_Namespace::SysCatalog::getRoles(), DBHandler::has_object_privilege(), DBHandler::import_geo_table(), import_export::import_thread_delimited(), import_export::import_thread_shapefile(), OverlapsJoinHashTable::initHashTableOnCpu(), anonymous_namespace{HashTable.cpp}::inner_to_string(), Catalog_Namespace::anonymous_namespace{SysCatalog.cpp}::insertOrUpdateObjectPrivileges(), Executor::interrupt(), ResultSet::isGeoColOnGpu(), TableFunctionExecutionContext::launchCpuCode(), TableFunctionExecutionContext::launchGpuCode(), QueryExecutionContext::launchGpuCode(), DBObject::loadKey(), main(), anonymous_namespace{ExtensionFunctionsBinding.cpp}::match_arguments(), migrations::MigrationMgr::migrateDateInDaysMetadata(), Catalog_Namespace::SysCatalog::migrateDBAccessPrivileges(), numeric_type_name(), import_export::ogr_to_type(), Geospatial::GeoTypesError::OGRErrorToStr(), File_Namespace::open(), anonymous_namespace{ArrowImporter.h}::ArrowValue< float >::operator DATA_TYPE(), anonymous_namespace{ArrowImporter.h}::ArrowValue< double >::operator DATA_TYPE(), anonymous_namespace{ArrowImporter.h}::ArrowValue< int64_t >::operator DATA_TYPE(), logger::JsonEncoder::operator()(), operator<<(), ColumnList< T >::operator[](), omnisci::JSON::operator[](), OutOfMemory::parse_error_str(), parse_numeric(), import_export::delimited_parser::parse_string_array(), DBHandler::prepare_loader_generic(), foreign_storage::csv_file_buffer_parser::process_geo_column(), anonymous_namespace{Types.cpp}::process_poly_ring(), DictionaryValueConverter< TARGET_TYPE >::processBuffer(), query_template_impl(), ra_exec_unit_desc_for_caching(), foreign_storage::SingleFileReader::readRegion(), Catalog_Namespace::Catalog::recordOwnershipOfObjectsInObjectPermissions(), Executor::redeclareFilterFunction(), ResultSetReductionJIT::reduceOneEntryBaseline(), ResultSetReductionJIT::reduceOneEntryTargetsNoCollisions(), QueryMemoryDescriptor::reductionKey(), Executor::registerActiveModule(), PerfectJoinHashTable::reifyForDevice(), BaselineJoinHashTable::reifyForDevice(), AutomaticIRMetadataGuard::rememberOurInstructions(), Catalog_Namespace::Catalog::renameColumn(), Catalog_Namespace::SysCatalog::renameDatabase(), File_Namespace::renameForDelete(), Catalog_Namespace::SysCatalog::renameObjectsInDescriptorMap(), Catalog_Namespace::Catalog::renamePhysicalTable(), Catalog_Namespace::Catalog::replaceDashboard(), TableArchiver::restoreTable(), ArrowResultSet::resultSetArrowLoopback(), Catalog_Namespace::SysCatalog::revokeAllOnDatabase_unsafe(), QueryRewriter::rewriteColumnarUpdate(), anonymous_namespace{TableArchiver.cpp}::run(), ExecutionKernel::runImpl(), import_export::QueryExporter::safeColumnName(), import_export::RenderGroupAnalyzer::seedFromExistingTableContents(), serialize_column_ref(), serialize_table_ref(), anonymous_namespace{DdlCommandExecutor.cpp}::set_headers_with_type(), Catalog_Namespace::Catalog::setColumnDictionary(), Catalog_Namespace::Catalog::setColumnSharedDictionary(), Catalog_Namespace::Catalog::setForeignServerProperty(), Catalog_Namespace::Catalog::setForeignTableProperty(), Executor::skipFragment(), start_calcite_server_as_daemon(), query_state::StdLogData::StdLogData(), anonymous_namespace{StringTransform.h}::stringlike(), switch(), Catalog_Namespace::anonymous_namespace{Catalog.cpp}::table_epochs_to_string(), anonymous_namespace{ResultSetReductionJIT.cpp}::target_info_key(), ThriftSerializers::target_meta_info_to_thrift(), import_export::anonymous_namespace{QueryExporterCSV.cpp}::target_value_to_string(), DBHandler::thrift_to_copyparams(), foreign_storage::anonymous_namespace{LazyParquetChunkLoader.cpp}::throw_missing_metadata_error(), foreign_storage::throw_number_of_columns_mismatch_error(), foreign_storage::anonymous_namespace{LazyParquetChunkLoader.cpp}::throw_row_group_larger_than_fragment_size_error(), foreign_storage::ParquetFixedLengthArrayEncoder::throwEmptyArrayException(), foreign_storage::ParquetFixedLengthArrayEncoder::throwWrongSizeArray(), logger::JsonEncoder::timer(), Parser::InSubquery::to_string(), Parser::InValues::to_string(), InputDescriptor::toString(), HashTable::toString(), RexAbstractInput::toString(), InputColDescriptor::toString(), table_functions::TableFunctionOutputRowSizer::toString(), ColSlotContext::toString(), anonymous_namespace{Datum.cpp}::toString(), toString(), Analyzer::ColumnVar::toString(), DBObject::toString(), RexOperator::toString(), Analyzer::Var::toString(), QueryMemoryDescriptor::toString(), RexInput::toString(), Analyzer::UOper::toString(), SortField::toString(), Analyzer::InValues::toString(), Analyzer::InIntegerSet::toString(), RexRef::toString(), RexAgg::toString(), Analyzer::LikelihoodExpr::toString(), RelAggregate::toString(), Analyzer::ExtractExpr::toString(), Analyzer::DateaddExpr::toString(), Analyzer::DatediffExpr::toString(), Analyzer::DatetruncExpr::toString(), Analyzer::OrderEntry::toString(), RelCompound::toString(), RelSort::toString(), Analyzer::GeoTransformOperator::toString(), RelModify::toString(), anonymous_namespace{HashJoin.cpp}::toStringFlat(), RelAlgTranslator::translateArrayFunction(), RelAlgTranslator::translateGeoFunctionArg(), RelAlgTranslator::translateHPTLiteral(), Executor::unregisterActiveModule(), Catalog_Namespace::SysCatalog::updateBlankPasswordsToRandom(), Fragmenter_Namespace::InsertOrderFragmenter::updateColumn(), Catalog_Namespace::Catalog::updateCustomExpression(), Catalog_Namespace::Catalog::updateDeletedColumnIndicator(), Catalog_Namespace::Catalog::updateDictionaryNames(), Catalog_Namespace::Catalog::updateFixlenArrayColumns(), Catalog_Namespace::Catalog::updateForeignTableRefreshTimes(), Catalog_Namespace::Catalog::updateGeoColumns(), Catalog_Namespace::Catalog::updateLogicalToPhysicalTableMap(), Catalog_Namespace::SysCatalog::updateObjectDescriptorMap(), Catalog_Namespace::Catalog::updatePageSize(), Catalog_Namespace::SysCatalog::updateSupportUserDeactivation(), Catalog_Namespace::Catalog::updateTableDescriptorSchema(), Catalog_Namespace::UserMetadata::userLoggable(), DateDaysOverflowValidator::validate(), CommandLineOptions::validate(), foreign_storage::Csv::anonymous_namespace{CsvShared.cpp}::validate_and_get_string_with_length(), foreign_storage::anonymous_namespace{LazyParquetChunkLoader.cpp}::validate_equal_schema(), foreign_storage::anonymous_namespace{LazyParquetChunkLoader.cpp}::validate_max_repetition_and_definition_level(), system_validator::validate_table_epochs(), foreign_storage::IntegralFixedLengthBoundsValidator< T >::validateValue(), foreign_storage::FloatPointValidator< T >::validateValue(), ColSlotContext::varlenOutputElementSize(), and ScalarExprToSql::visitUOper().

101  {
102  return std::string(v);
103 }
template<>
std::string to_string ( std::string &&  v)

Definition at line 106 of file StringTransform.cpp.

106  {
107  return std::move(v);
108 }