OmniSciDB  c07336695a
Parser::CopyTableStmt Class Reference

#include <ParserNode.h>

+ Inheritance diagram for Parser::CopyTableStmt:
+ Collaboration diagram for Parser::CopyTableStmt:

Public Member Functions

 CopyTableStmt (std::string *t, std::string *f, std::list< NameValueAssign *> *o)
 
void execute (const Catalog_Namespace::SessionInfo &session) override
 
void execute (const Catalog_Namespace::SessionInfo &session, const std::function< std::unique_ptr< Importer_NS::Importer >(Catalog_Namespace::Catalog &, const TableDescriptor *, const std::string &, const Importer_NS::CopyParams &)> &importer_factory)
 
std::string & get_table () const
 
bool was_geo_copy_from () const
 
void get_geo_copy_from_payload (std::string &geo_copy_from_table, std::string &geo_copy_from_file_name, Importer_NS::CopyParams &geo_copy_from_copy_params, std::string &geo_copy_from_partitions)
 
- Public Member Functions inherited from Parser::DDLStmt
void setColumnDescriptor (ColumnDescriptor &cd, const ColumnDef *coldef)
 
- Public Member Functions inherited from Parser::Node
virtual ~Node ()
 

Public Attributes

std::unique_ptr< std::string > return_message
 

Private Attributes

std::unique_ptr< std::string > table
 
std::unique_ptr< std::string > file_pattern
 
std::list< std::unique_ptr< NameValueAssign > > options
 
bool _was_geo_copy_from = false
 
std::string _geo_copy_from_file_name
 
Importer_NS::CopyParams _geo_copy_from_copy_params
 
std::string _geo_copy_from_partitions
 

Detailed Description

Definition at line 1270 of file ParserNode.h.

Constructor & Destructor Documentation

◆ CopyTableStmt()

Parser::CopyTableStmt::CopyTableStmt ( std::string *  t,
std::string *  f,
std::list< NameValueAssign *> *  o 
)
inline

Definition at line 1272 of file ParserNode.h.

References session.

1273  : table(t), file_pattern(f) {
1274  if (o) {
1275  for (const auto e : *o) {
1276  options.emplace_back(e);
1277  }
1278  delete o;
1279  }
1280  }
std::list< std::unique_ptr< NameValueAssign > > options
Definition: ParserNode.h:1311
std::unique_ptr< std::string > table
Definition: ParserNode.h:1309
std::unique_ptr< std::string > file_pattern
Definition: ParserNode.h:1310

Member Function Documentation

◆ execute() [1/2]

void Parser::CopyTableStmt::execute ( const Catalog_Namespace::SessionInfo session)
overridevirtual

Implements Parser::DDLStmt.

Definition at line 3326 of file ParserNode.cpp.

Referenced by MapDHandler::execute_distributed_copy_statement(), anonymous_namespace{ImportTest.cpp}::import_test_common_geo(), and QueryRunner::QueryRunner::runImport().

3326  {
3327  auto importer_factory = [](Catalog_Namespace::Catalog& catalog,
3328  const TableDescriptor* td,
3329  const std::string& file_path,
3330  const Importer_NS::CopyParams& copy_params) {
3331  return boost::make_unique<Importer_NS::Importer>(catalog, td, file_path, copy_params);
3332  };
3333  return execute(session, importer_factory);
3334 }
class for a per-database catalog. also includes metadata for the current database and the current use...
Definition: Catalog.h:81
void execute(const Catalog_Namespace::SessionInfo &session) override
specifies the content in-memory of a row in the table metadata table
+ Here is the caller graph for this function:

◆ execute() [2/2]

void Parser::CopyTableStmt::execute ( const Catalog_Namespace::SessionInfo session,
const std::function< std::unique_ptr< Importer_NS::Importer >(Catalog_Namespace::Catalog &, const TableDescriptor *, const std::string &, const Importer_NS::CopyParams &)> &  importer_factory 
)

Definition at line 3336 of file ParserNode.cpp.

References Importer_NS::CopyParams::array_begin, Importer_NS::CopyParams::array_delim, Importer_NS::CopyParams::array_end, Importer_NS::CopyParams::buffer_size, CHECK, Importer_NS::DELIMITED, Importer_NS::CopyParams::delimiter, logger::ERROR, Importer_NS::CopyParams::escape, measure< TimeT >::execution(), Importer_NS::CopyParams::file_type, Importer_NS::CopyParams::geo_coords_comp_param, Importer_NS::CopyParams::geo_coords_encoding, Importer_NS::CopyParams::geo_coords_srid, Importer_NS::CopyParams::geo_coords_type, Importer_NS::CopyParams::geo_layer_name, Catalog_Namespace::SessionInfo::get_currentUser(), Parser::IntLiteral::get_intval(), Parser::StringLiteral::get_stringval(), Catalog_Namespace::SessionInfo::getCatalog(), Importer_NS::HAS_HEADER, Importer_NS::CopyParams::has_header, logger::INFO, AccessPrivileges::INSERT_INTO_TABLE, kENCODING_GEOINT, kENCODING_NONE, kGEOMETRY, Importer_NS::CopyParams::line_delim, DBObject::loadKey(), LOG, Importer_NS::CopyParams::lonlat, Importer_NS::CopyParams::max_reject, Importer_NS::NO_HEADER, Importer_NS::CopyParams::null_str, Importer_NS::CopyParams::plain_text, Importer_NS::POLYGON, anonymous_namespace{DBObjectPrivilegesTest.cpp}::privObjects, Importer_NS::CopyParams::quote, Importer_NS::CopyParams::quoted, run-benchmark-import::res, run-benchmark-import::rows_rejected, Importer_NS::CopyParams::s3_access_key, Importer_NS::CopyParams::s3_endpoint, Importer_NS::CopyParams::s3_region, Importer_NS::CopyParams::s3_secret_key, DBObject::setPrivileges(), TableDBObjectType, Importer_NS::CopyParams::threads, to_string(), and Catalog_Namespace::UserMetadata::userName.

3341  {
3342  size_t rows_completed = 0;
3343  size_t rows_rejected = 0;
3344  size_t total_time = 0;
3345  bool load_truncated = false;
3346 
3347  auto& catalog = session.getCatalog();
3348  const TableDescriptor* td = catalog.getMetadataForTable(*table);
3349 
3350  // if the table already exists, it's locked, so check access privileges
3351  if (td) {
3352  std::vector<DBObject> privObjects;
3353  DBObject dbObject(*table, TableDBObjectType);
3354  dbObject.loadKey(catalog);
3355  dbObject.setPrivileges(AccessPrivileges::INSERT_INTO_TABLE);
3356  privObjects.push_back(dbObject);
3357  if (!SysCatalog::instance().checkPrivileges(session.get_currentUser(), privObjects)) {
3358  throw std::runtime_error("Violation of access privileges: user " +
3359  session.get_currentUser().userName +
3360  " has no insert privileges for table " + *table + ".");
3361  }
3362  }
3363 
3364  // since we'll have not only posix file names but also s3/hdfs/... url
3365  // we do not expand wildcard or check file existence here.
3366  // from here on, file_path contains something which may be a url
3367  // or a wildcard of file names;
3368  std::string file_path = *file_pattern;
3369  Importer_NS::CopyParams copy_params;
3370  if (!options.empty()) {
3371  for (auto& p : options) {
3372  if (boost::iequals(*p->get_name(), "max_reject")) {
3373  const IntLiteral* int_literal = dynamic_cast<const IntLiteral*>(p->get_value());
3374  if (int_literal == nullptr) {
3375  throw std::runtime_error("max_reject option must be an integer.");
3376  }
3377  copy_params.max_reject = int_literal->get_intval();
3378  } else if (boost::iequals(*p->get_name(), "buffer_size")) {
3379  const IntLiteral* int_literal = dynamic_cast<const IntLiteral*>(p->get_value());
3380  if (int_literal == nullptr) {
3381  throw std::runtime_error("buffer_size option must be an integer.");
3382  }
3383  copy_params.buffer_size = std::max<size_t>(1 << 20, int_literal->get_intval());
3384  } else if (boost::iequals(*p->get_name(), "threads")) {
3385  const IntLiteral* int_literal = dynamic_cast<const IntLiteral*>(p->get_value());
3386  if (int_literal == nullptr) {
3387  throw std::runtime_error("Threads option must be an integer.");
3388  }
3389  copy_params.threads = int_literal->get_intval();
3390  } else if (boost::iequals(*p->get_name(), "delimiter")) {
3391  const StringLiteral* str_literal =
3392  dynamic_cast<const StringLiteral*>(p->get_value());
3393  if (str_literal == nullptr) {
3394  throw std::runtime_error("Delimiter option must be a string.");
3395  } else if (str_literal->get_stringval()->length() != 1) {
3396  throw std::runtime_error("Delimiter must be a single character string.");
3397  }
3398  copy_params.delimiter = (*str_literal->get_stringval())[0];
3399  } else if (boost::iequals(*p->get_name(), "nulls")) {
3400  const StringLiteral* str_literal =
3401  dynamic_cast<const StringLiteral*>(p->get_value());
3402  if (str_literal == nullptr) {
3403  throw std::runtime_error("Nulls option must be a string.");
3404  }
3405  copy_params.null_str = *str_literal->get_stringval();
3406  } else if (boost::iequals(*p->get_name(), "header")) {
3407  const StringLiteral* str_literal =
3408  dynamic_cast<const StringLiteral*>(p->get_value());
3409  if (str_literal == nullptr) {
3410  throw std::runtime_error("Header option must be a boolean.");
3411  }
3412  const std::string* s = str_literal->get_stringval();
3413  if (*s == "t" || *s == "true" || *s == "T" || *s == "True") {
3415  } else if (*s == "f" || *s == "false" || *s == "F" || *s == "False") {
3417  } else {
3418  throw std::runtime_error("Invalid string for boolean " + *s);
3419  }
3420 #ifdef ENABLE_IMPORT_PARQUET
3421  } else if (boost::iequals(*p->get_name(), "parquet")) {
3422  const StringLiteral* str_literal =
3423  dynamic_cast<const StringLiteral*>(p->get_value());
3424  if (str_literal == nullptr) {
3425  throw std::runtime_error("Parquet option must be a boolean.");
3426  }
3427  const std::string* s = str_literal->get_stringval();
3428  if (*s == "t" || *s == "true" || *s == "T" || *s == "True") {
3429  // not sure a parquet "table" type is proper, but to make code
3430  // look consistent in some places, let's set "table" type too
3431  copy_params.file_type = Importer_NS::FileType::PARQUET;
3432  } else if (*s == "f" || *s == "false" || *s == "F" || *s == "False") {
3433  } else {
3434  throw std::runtime_error("Invalid string for boolean " + *s);
3435  }
3436 #endif // ENABLE_IMPORT_PARQUET
3437  } else if (boost::iequals(*p->get_name(), "s3_access_key")) {
3438  const StringLiteral* str_literal =
3439  dynamic_cast<const StringLiteral*>(p->get_value());
3440  if (str_literal == nullptr) {
3441  throw std::runtime_error("Option s3_access_key must be a string.");
3442  }
3443  copy_params.s3_access_key = *str_literal->get_stringval();
3444  } else if (boost::iequals(*p->get_name(), "s3_secret_key")) {
3445  const StringLiteral* str_literal =
3446  dynamic_cast<const StringLiteral*>(p->get_value());
3447  if (str_literal == nullptr) {
3448  throw std::runtime_error("Option s3_secret_key must be a string.");
3449  }
3450  copy_params.s3_secret_key = *str_literal->get_stringval();
3451  } else if (boost::iequals(*p->get_name(), "s3_region")) {
3452  const StringLiteral* str_literal =
3453  dynamic_cast<const StringLiteral*>(p->get_value());
3454  if (str_literal == nullptr) {
3455  throw std::runtime_error("Option s3_region must be a string.");
3456  }
3457  copy_params.s3_region = *str_literal->get_stringval();
3458  } else if (boost::iequals(*p->get_name(), "s3_endpoint")) {
3459  const StringLiteral* str_literal =
3460  dynamic_cast<const StringLiteral*>(p->get_value());
3461  if (str_literal == nullptr) {
3462  throw std::runtime_error("Option s3_endpoint must be a string.");
3463  }
3464  copy_params.s3_endpoint = *str_literal->get_stringval();
3465  } else if (boost::iequals(*p->get_name(), "quote")) {
3466  const StringLiteral* str_literal =
3467  dynamic_cast<const StringLiteral*>(p->get_value());
3468  if (str_literal == nullptr) {
3469  throw std::runtime_error("Quote option must be a string.");
3470  } else if (str_literal->get_stringval()->length() != 1) {
3471  throw std::runtime_error("Quote must be a single character string.");
3472  }
3473  copy_params.quote = (*str_literal->get_stringval())[0];
3474  } else if (boost::iequals(*p->get_name(), "escape")) {
3475  const StringLiteral* str_literal =
3476  dynamic_cast<const StringLiteral*>(p->get_value());
3477  if (str_literal == nullptr) {
3478  throw std::runtime_error("Escape option must be a string.");
3479  } else if (str_literal->get_stringval()->length() != 1) {
3480  throw std::runtime_error("Escape must be a single character string.");
3481  }
3482  copy_params.escape = (*str_literal->get_stringval())[0];
3483  } else if (boost::iequals(*p->get_name(), "line_delimiter")) {
3484  const StringLiteral* str_literal =
3485  dynamic_cast<const StringLiteral*>(p->get_value());
3486  if (str_literal == nullptr) {
3487  throw std::runtime_error("Line_delimiter option must be a string.");
3488  } else if (str_literal->get_stringval()->length() != 1) {
3489  throw std::runtime_error("Line_delimiter must be a single character string.");
3490  }
3491  copy_params.line_delim = (*str_literal->get_stringval())[0];
3492  } else if (boost::iequals(*p->get_name(), "quoted")) {
3493  const StringLiteral* str_literal =
3494  dynamic_cast<const StringLiteral*>(p->get_value());
3495  if (str_literal == nullptr) {
3496  throw std::runtime_error("Quoted option must be a boolean.");
3497  }
3498  const std::string* s = str_literal->get_stringval();
3499  if (*s == "t" || *s == "true" || *s == "T" || *s == "True") {
3500  copy_params.quoted = true;
3501  } else if (*s == "f" || *s == "false" || *s == "F" || *s == "False") {
3502  copy_params.quoted = false;
3503  } else {
3504  throw std::runtime_error("Invalid string for boolean " + *s);
3505  }
3506  } else if (boost::iequals(*p->get_name(), "plain_text")) {
3507  const StringLiteral* str_literal =
3508  dynamic_cast<const StringLiteral*>(p->get_value());
3509  if (str_literal == nullptr) {
3510  throw std::runtime_error("plain_text option must be a boolean.");
3511  }
3512  const std::string* s = str_literal->get_stringval();
3513  if (*s == "t" || *s == "true" || *s == "T" || *s == "True") {
3514  copy_params.plain_text = true;
3515  } else if (*s == "f" || *s == "false" || *s == "F" || *s == "False") {
3516  copy_params.plain_text = false;
3517  } else {
3518  throw std::runtime_error("Invalid string for boolean " + *s);
3519  }
3520  } else if (boost::iequals(*p->get_name(), "array_marker")) {
3521  const StringLiteral* str_literal =
3522  dynamic_cast<const StringLiteral*>(p->get_value());
3523  if (str_literal == nullptr) {
3524  throw std::runtime_error("Array Marker option must be a string.");
3525  } else if (str_literal->get_stringval()->length() != 2) {
3526  throw std::runtime_error(
3527  "Array Marker option must be exactly two characters. Default is {}.");
3528  }
3529  copy_params.array_begin = (*str_literal->get_stringval())[0];
3530  copy_params.array_end = (*str_literal->get_stringval())[1];
3531  } else if (boost::iequals(*p->get_name(), "array_delimiter")) {
3532  const StringLiteral* str_literal =
3533  dynamic_cast<const StringLiteral*>(p->get_value());
3534  if (str_literal == nullptr) {
3535  throw std::runtime_error("Array Delimiter option must be a string.");
3536  } else if (str_literal->get_stringval()->length() != 1) {
3537  throw std::runtime_error("Array Delimiter must be a single character string.");
3538  }
3539  copy_params.array_delim = (*str_literal->get_stringval())[0];
3540  } else if (boost::iequals(*p->get_name(), "lonlat")) {
3541  const StringLiteral* str_literal =
3542  dynamic_cast<const StringLiteral*>(p->get_value());
3543  if (str_literal == nullptr) {
3544  throw std::runtime_error("Lonlat option must be a boolean.");
3545  }
3546  const std::string* s = str_literal->get_stringval();
3547  if (*s == "t" || *s == "true" || *s == "T" || *s == "True") {
3548  copy_params.lonlat = true;
3549  } else if (*s == "f" || *s == "false" || *s == "F" || *s == "False") {
3550  copy_params.lonlat = false;
3551  } else {
3552  throw std::runtime_error("Invalid string for boolean " + *s);
3553  }
3554  } else if (boost::iequals(*p->get_name(), "geo")) {
3555  const StringLiteral* str_literal =
3556  dynamic_cast<const StringLiteral*>(p->get_value());
3557  if (str_literal == nullptr) {
3558  throw std::runtime_error("Geo option must be a boolean.");
3559  }
3560  const std::string* s = str_literal->get_stringval();
3561  if (*s == "t" || *s == "true" || *s == "T" || *s == "True") {
3563  } else if (*s == "f" || *s == "false" || *s == "F" || *s == "False") {
3565  } else {
3566  throw std::runtime_error("Invalid string for boolean " + *s);
3567  }
3568  } else if (boost::iequals(*p->get_name(), "geo_coords_type")) {
3569  const StringLiteral* str_literal =
3570  dynamic_cast<const StringLiteral*>(p->get_value());
3571  if (str_literal == nullptr) {
3572  throw std::runtime_error("'geo_coords_type' option must be a string");
3573  }
3574  const std::string* s = str_literal->get_stringval();
3575  if (boost::iequals(*s, "geography")) {
3576  throw std::runtime_error(
3577  "GEOGRAPHY coords type not yet supported. Please use GEOMETRY.");
3578  // copy_params.geo_coords_type = kGEOGRAPHY;
3579  } else if (boost::iequals(*s, "geometry")) {
3580  copy_params.geo_coords_type = kGEOMETRY;
3581  } else {
3582  throw std::runtime_error(
3583  "Invalid string for 'geo_coords_type' option (must be 'GEOGRAPHY' or "
3584  "'GEOMETRY'): " +
3585  *s);
3586  }
3587  } else if (boost::iequals(*p->get_name(), "geo_coords_encoding")) {
3588  const StringLiteral* str_literal =
3589  dynamic_cast<const StringLiteral*>(p->get_value());
3590  if (str_literal == nullptr) {
3591  throw std::runtime_error("'geo_coords_encoding' option must be a string");
3592  }
3593  const std::string* s = str_literal->get_stringval();
3594  if (boost::iequals(*s, "none")) {
3595  copy_params.geo_coords_encoding = kENCODING_NONE;
3596  copy_params.geo_coords_comp_param = 0;
3597  } else if (boost::iequals(*s, "compressed(32)")) {
3598  copy_params.geo_coords_encoding = kENCODING_GEOINT;
3599  copy_params.geo_coords_comp_param = 32;
3600  } else {
3601  throw std::runtime_error(
3602  "Invalid string for 'geo_coords_encoding' option (must be 'NONE' or "
3603  "'COMPRESSED(32)'): " +
3604  *s);
3605  }
3606  } else if (boost::iequals(*p->get_name(), "geo_coords_srid")) {
3607  const IntLiteral* int_literal = dynamic_cast<const IntLiteral*>(p->get_value());
3608  if (int_literal == nullptr) {
3609  throw std::runtime_error("'geo_coords_srid' option must be an integer");
3610  }
3611  const int srid = int_literal->get_intval();
3612  if (srid == 4326 || srid == 3857 || srid == 900913) {
3613  copy_params.geo_coords_srid = srid;
3614  } else {
3615  throw std::runtime_error(
3616  "Invalid value for 'geo_coords_srid' option (must be 4326, 3857, or "
3617  "900913): " +
3618  std::to_string(srid));
3619  }
3620  } else if (boost::iequals(*p->get_name(), "geo_layer_name")) {
3621  const StringLiteral* str_literal =
3622  dynamic_cast<const StringLiteral*>(p->get_value());
3623  if (str_literal == nullptr) {
3624  throw std::runtime_error("'geo_layer_name' option must be a string");
3625  }
3626  const std::string* layer_name = str_literal->get_stringval();
3627  if (layer_name) {
3628  copy_params.geo_layer_name = *layer_name;
3629  } else {
3630  throw std::runtime_error("Invalid value for 'geo_layer_name' option");
3631  }
3632  } else if (boost::iequals(*p->get_name(), "partitions")) {
3633  if (copy_params.file_type == Importer_NS::FileType::POLYGON) {
3634  const auto partitions =
3635  static_cast<const StringLiteral*>(p->get_value())->get_stringval();
3636  CHECK(partitions);
3637  const auto partitions_uc = boost::to_upper_copy<std::string>(*partitions);
3638  if (partitions_uc != "REPLICATED") {
3639  throw std::runtime_error("PARTITIONS must be REPLICATED for geo COPY");
3640  }
3641  _geo_copy_from_partitions = partitions_uc;
3642  } else {
3643  throw std::runtime_error("PARTITIONS option not supported for non-geo COPY: " +
3644  *p->get_name());
3645  }
3646  } else {
3647  throw std::runtime_error("Invalid option for COPY: " + *p->get_name());
3648  }
3649  }
3650  }
3651 
3652  std::string tr;
3653  if (copy_params.file_type == Importer_NS::FileType::POLYGON) {
3654  // geo import
3655  // we do nothing here, except stash the parameters so we can
3656  // do the import when we unwind to the top of the handler
3657  _geo_copy_from_file_name = file_path;
3658  _geo_copy_from_copy_params = copy_params;
3659  _was_geo_copy_from = true;
3660 
3661  // the result string
3662  // @TODO simon.eves put something more useful in here
3663  // except we really can't because we haven't done the import yet!
3664  if (td) {
3665  tr = std::string("Appending geo to table '") + *table + std::string("'...");
3666  } else {
3667  tr = std::string("Creating table '") + *table +
3668  std::string("' and importing geo...");
3669  }
3670  } else {
3671  if (td) {
3672  // regular import
3673  auto importer = importer_factory(catalog, td, file_path, copy_params);
3674  auto ms = measure<>::execution([&]() {
3675  auto res = importer->import();
3676  rows_completed += res.rows_completed;
3677  rows_rejected += res.rows_rejected;
3678  load_truncated = res.load_truncated;
3679  });
3680  total_time += ms;
3681 
3682  // results
3683  if (load_truncated || rows_rejected > copy_params.max_reject) {
3684  LOG(ERROR) << "COPY exited early due to reject records count during multi file "
3685  "processing ";
3686  // if we have crossed the truncated load threshold
3687  load_truncated = true;
3688  }
3689  if (!load_truncated) {
3690  tr = std::string("Loaded: " + std::to_string(rows_completed) +
3691  " recs, Rejected: " + std::to_string(rows_rejected) +
3692  " recs in " + std::to_string((double)total_time / 1000.0) +
3693  " secs");
3694  } else {
3695  tr = std::string("Loader truncated due to reject count. Processed : " +
3696  std::to_string(rows_completed) + " recs, Rejected: " +
3697  std::to_string(rows_rejected) + " recs in " +
3698  std::to_string((double)total_time / 1000.0) + " secs");
3699  }
3700  } else {
3701  throw std::runtime_error("Table '" + *table + "' must exist before COPY FROM");
3702  }
3703  }
3704 
3705  return_message.reset(new std::string(tr));
3706  LOG(INFO) << tr;
3707 }
std::string null_str
Definition: Importer.h:100
std::list< std::unique_ptr< NameValueAssign > > options
Definition: ParserNode.h:1311
#define LOG(tag)
Definition: Logger.h:182
std::unique_ptr< std::string > return_message
Definition: ParserNode.h:1288
static const AccessPrivileges INSERT_INTO_TABLE
Definition: DBObject.h:154
SQLTypes geo_coords_type
Definition: Importer.h:128
std::unique_ptr< std::string > table
Definition: ParserNode.h:1309
const UserMetadata & get_currentUser() const
Definition: SessionInfo.h:93
std::string to_string(char const *&&v)
EncodingType geo_coords_encoding
Definition: Importer.h:126
Importer_NS::CopyParams _geo_copy_from_copy_params
Definition: ParserNode.h:1315
std::string s3_access_key
Definition: Importer.h:115
Catalog & getCatalog() const
Definition: SessionInfo.h:90
std::string _geo_copy_from_partitions
Definition: ParserNode.h:1316
ImportHeaderRow has_header
Definition: Importer.h:101
std::string s3_endpoint
Definition: Importer.h:118
std::string s3_region
Definition: Importer.h:117
std::string geo_layer_name
Definition: Importer.h:131
std::unique_ptr< std::string > file_pattern
Definition: ParserNode.h:1310
#define CHECK(condition)
Definition: Logger.h:187
static TimeT::rep execution(F func, Args &&... args)
Definition: sample.cpp:29
specifies the content in-memory of a row in the table metadata table
std::string s3_secret_key
Definition: Importer.h:116
std::string _geo_copy_from_file_name
Definition: ParserNode.h:1314
int32_t geo_coords_comp_param
Definition: Importer.h:127
+ Here is the call graph for this function:

◆ get_geo_copy_from_payload()

void Parser::CopyTableStmt::get_geo_copy_from_payload ( std::string &  geo_copy_from_table,
std::string &  geo_copy_from_file_name,
Importer_NS::CopyParams geo_copy_from_copy_params,
std::string &  geo_copy_from_partitions 
)
inline

Definition at line 1297 of file ParserNode.h.

Referenced by anonymous_namespace{ImportTest.cpp}::import_test_common_geo().

1300  {
1301  geo_copy_from_table = *table;
1302  geo_copy_from_file_name = _geo_copy_from_file_name;
1303  geo_copy_from_copy_params = _geo_copy_from_copy_params;
1304  geo_copy_from_partitions = _geo_copy_from_partitions;
1305  _was_geo_copy_from = false;
1306  }
std::unique_ptr< std::string > table
Definition: ParserNode.h:1309
Importer_NS::CopyParams _geo_copy_from_copy_params
Definition: ParserNode.h:1315
std::string _geo_copy_from_partitions
Definition: ParserNode.h:1316
std::string _geo_copy_from_file_name
Definition: ParserNode.h:1314
+ Here is the caller graph for this function:

◆ get_table()

std::string& Parser::CopyTableStmt::get_table ( ) const
inline

Definition at line 1290 of file ParserNode.h.

References CHECK.

1290  {
1291  CHECK(table);
1292  return *table;
1293  }
std::unique_ptr< std::string > table
Definition: ParserNode.h:1309
#define CHECK(condition)
Definition: Logger.h:187

◆ was_geo_copy_from()

bool Parser::CopyTableStmt::was_geo_copy_from ( ) const
inline

Definition at line 1295 of file ParserNode.h.

Referenced by anonymous_namespace{ImportTest.cpp}::import_test_common_geo().

1295 { return _was_geo_copy_from; }
+ Here is the caller graph for this function:

Member Data Documentation

◆ _geo_copy_from_copy_params

Importer_NS::CopyParams Parser::CopyTableStmt::_geo_copy_from_copy_params
private

Definition at line 1315 of file ParserNode.h.

◆ _geo_copy_from_file_name

std::string Parser::CopyTableStmt::_geo_copy_from_file_name
private

Definition at line 1314 of file ParserNode.h.

◆ _geo_copy_from_partitions

std::string Parser::CopyTableStmt::_geo_copy_from_partitions
private

Definition at line 1316 of file ParserNode.h.

◆ _was_geo_copy_from

bool Parser::CopyTableStmt::_was_geo_copy_from = false
private

Definition at line 1313 of file ParserNode.h.

◆ file_pattern

std::unique_ptr<std::string> Parser::CopyTableStmt::file_pattern
private

Definition at line 1310 of file ParserNode.h.

◆ options

std::list<std::unique_ptr<NameValueAssign> > Parser::CopyTableStmt::options
private

Definition at line 1311 of file ParserNode.h.

◆ return_message

std::unique_ptr<std::string> Parser::CopyTableStmt::return_message

Definition at line 1288 of file ParserNode.h.

◆ table

std::unique_ptr<std::string> Parser::CopyTableStmt::table
private

Definition at line 1309 of file ParserNode.h.


The documentation for this class was generated from the following files: