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

Go to the source code of this file.

Namespaces

 anonymous_namespace{CalciteAdapter.cpp}
 

Functions

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 273 of file CalciteAdapter.cpp.

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

Referenced by Parser::create_stmt_for_query(), QueryRunner::QueryRunner::createStatement(), Parser::CreateViewStmt::execute(), QueryRunner::QueryRunner::getCalcitePlan(), Parser::LocalQueryConnector::getOuterFragmentCount(), QueryRunner::QueryRunner::getParsedGlobalQueryHints(), QueryRunner::QueryRunner::getParsedQueryHint(), QueryRunner::QueryRunner::getParsedQueryHints(), QueryRunner::QueryRunner::getQueryInfoForDataRecyclerTest(), QueryRunner::QueryRunner::getRaExecutionSequence(), QueryRunner::QueryRunner::getRelAlgDag(), QueryRunner::QueryRunner::getRelAlgTranslator(), QueryRunner::QueryRunner::getRootNodeFromParsedQuery(), DBHandler::processCalciteRequest(), Parser::LocalQueryConnector::query(), QueryRunner::anonymous_namespace{QueryRunner.cpp}::run_select_query_with_filter_push_down(), QueryRunner::QueryRunner::runDDLStatement(), QueryRunner::QueryRunner::runSelectQuery(), QueryRunner::QueryRunner::runSQLWithAllowingInterrupt(), and QueryRunner::QueryRunner::validateDDLStatement().

273  {
274  try {
275  return pg_shim_impl(query);
276  } catch (const std::exception& e) {
277  LOG(WARNING) << "Error applying shim: " << e.what() << "\nContinuing query parse...";
278  // boost::regex throws an exception about the complexity of matching when
279  // the wrong type of quotes are used or they're mismatched. Let the query
280  // through unmodified, the parser will throw a much more informative error.
281  }
282  return query;
283 }
#define LOG(tag)
Definition: Logger.h:285
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: