OmniSciDB  fe05a0c208
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
CalciteAdapter.cpp File Reference
#include "CalciteAdapter.h"
#include <boost/algorithm/string/predicate.hpp>
#include <boost/algorithm/string/replace.hpp>
#include <boost/regex.hpp>
#include "Logger/Logger.h"
#include "Shared/StringTransform.h"
+ Include dependency graph for CalciteAdapter.cpp:

Go to the source code of this file.




std::string anonymous_namespace{CalciteAdapter.cpp}::pg_shim_impl (const std::string &query)
std::string pg_shim (const std::string &query)

Function Documentation

std::string pg_shim ( const std::string &  query)

Definition at line 219 of file CalciteAdapter.cpp.

References LOG, anonymous_namespace{CalciteAdapter.cpp}::pg_shim_impl(), and logger::WARNING.

Referenced by Parser::InsertIntoTableAsSelectStmt::execute(), Parser::CreateTableAsSelectStmt::execute(), Parser::CreateViewStmt::execute(), Parser::LocalConnector::getOuterFragmentCount(), QueryRunner::QueryRunner::getParsedQueryHint(), DBHandler::parse_to_ra(), Parser::LocalConnector::query(), QueryRunner::anonymous_namespace{QueryRunner.cpp}::run_select_query_with_filter_push_down(), QueryRunner::QueryRunner::runSelectQuery(), and QueryRunner::QueryRunner::runSQLWithAllowingInterrupt().

219  {
220  try {
221  return pg_shim_impl(query);
222  } catch (const std::exception& e) {
223  LOG(WARNING) << "Error applying shim: " << e.what() << "\nContinuing query parse...";
224  // boost::regex throws an exception about the complexity of matching when
225  // the wrong type of quotes are used or they're mismatched. Let the query
226  // through unmodified, the parser will throw a much more informative error.
227  }
228  return query;
229 }
#define LOG(tag)
Definition: Logger.h:194
std::string pg_shim_impl(const std::string &query)

+ Here is the call graph for this function:

+ Here is the caller graph for this function: