OmniSciDB  addbbd5075
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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 1371 of file ParserNode.h.

Constructor & Destructor Documentation

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

Definition at line 1373 of file ParserNode.h.

References options.

1374  : table(t), file_pattern(f) {
1375  if (o) {
1376  for (const auto e : *o) {
1377  options.emplace_back(e);
1378  }
1379  delete o;
1380  }
1381  }
std::list< std::unique_ptr< NameValueAssign > > options
Definition: ParserNode.h:1412
std::unique_ptr< std::string > table
Definition: ParserNode.h:1410
std::unique_ptr< std::string > file_pattern
Definition: ParserNode.h:1411

Member Function Documentation

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

Implements Parser::DDLStmt.

Definition at line 3428 of file ParserNode.cpp.

Referenced by MapDHandler::execute_distributed_copy_statement(), and QueryRunner::QueryRunner::runImport().

3428  {
3429  auto importer_factory = [](Catalog_Namespace::Catalog& catalog,
3430  const TableDescriptor* td,
3431  const std::string& file_path,
3432  const Importer_NS::CopyParams& copy_params) {
3433  return boost::make_unique<Importer_NS::Importer>(catalog, td, file_path, copy_params);
3434  };
3435  return execute(session, importer_factory);
3436 }
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:

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 3438 of file ParserNode.cpp.

References Importer_NS::CopyParams::array_begin, Importer_NS::CopyParams::array_delim, Importer_NS::CopyParams::array_end, Parser::anonymous_namespace{ParserNode.cpp}::bool_from_string_literal(), 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_assign_render_groups, 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_explode_collections, 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, Importer_NS::CopyParams::quote, Importer_NS::CopyParams::quoted, 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.

3443  {
3444  size_t rows_completed = 0;
3445  size_t rows_rejected = 0;
3446  size_t total_time = 0;
3447  bool load_truncated = false;
3448 
3449  auto& catalog = session.getCatalog();
3450  const TableDescriptor* td = catalog.getMetadataForTable(*table);
3451 
3452  // if the table already exists, it's locked, so check access privileges
3453  if (td) {
3454  std::vector<DBObject> privObjects;
3455  DBObject dbObject(*table, TableDBObjectType);
3456  dbObject.loadKey(catalog);
3457  dbObject.setPrivileges(AccessPrivileges::INSERT_INTO_TABLE);
3458  privObjects.push_back(dbObject);
3459  if (!SysCatalog::instance().checkPrivileges(session.get_currentUser(), privObjects)) {
3460  throw std::runtime_error("Violation of access privileges: user " +
3461  session.get_currentUser().userName +
3462  " has no insert privileges for table " + *table + ".");
3463  }
3464  }
3465 
3466  // since we'll have not only posix file names but also s3/hdfs/... url
3467  // we do not expand wildcard or check file existence here.
3468  // from here on, file_path contains something which may be a url
3469  // or a wildcard of file names;
3470  std::string file_path = *file_pattern;
3471  Importer_NS::CopyParams copy_params;
3472  if (!options.empty()) {
3473  for (auto& p : options) {
3474  if (boost::iequals(*p->get_name(), "max_reject")) {
3475  const IntLiteral* int_literal = dynamic_cast<const IntLiteral*>(p->get_value());
3476  if (int_literal == nullptr) {
3477  throw std::runtime_error("max_reject option must be an integer.");
3478  }
3479  copy_params.max_reject = int_literal->get_intval();
3480  } else if (boost::iequals(*p->get_name(), "buffer_size")) {
3481  const IntLiteral* int_literal = dynamic_cast<const IntLiteral*>(p->get_value());
3482  if (int_literal == nullptr) {
3483  throw std::runtime_error("buffer_size option must be an integer.");
3484  }
3485  copy_params.buffer_size = std::max<size_t>(1 << 20, int_literal->get_intval());
3486  } else if (boost::iequals(*p->get_name(), "threads")) {
3487  const IntLiteral* int_literal = dynamic_cast<const IntLiteral*>(p->get_value());
3488  if (int_literal == nullptr) {
3489  throw std::runtime_error("Threads option must be an integer.");
3490  }
3491  copy_params.threads = int_literal->get_intval();
3492  } else if (boost::iequals(*p->get_name(), "delimiter")) {
3493  const StringLiteral* str_literal =
3494  dynamic_cast<const StringLiteral*>(p->get_value());
3495  if (str_literal == nullptr) {
3496  throw std::runtime_error("Delimiter option must be a string.");
3497  } else if (str_literal->get_stringval()->length() != 1) {
3498  throw std::runtime_error("Delimiter must be a single character string.");
3499  }
3500  copy_params.delimiter = (*str_literal->get_stringval())[0];
3501  } else if (boost::iequals(*p->get_name(), "nulls")) {
3502  const StringLiteral* str_literal =
3503  dynamic_cast<const StringLiteral*>(p->get_value());
3504  if (str_literal == nullptr) {
3505  throw std::runtime_error("Nulls option must be a string.");
3506  }
3507  copy_params.null_str = *str_literal->get_stringval();
3508  } else if (boost::iequals(*p->get_name(), "header")) {
3509  const StringLiteral* str_literal =
3510  dynamic_cast<const StringLiteral*>(p->get_value());
3511  if (str_literal == nullptr) {
3512  throw std::runtime_error("Header option must be a boolean.");
3513  }
3514  copy_params.has_header = bool_from_string_literal(str_literal)
3517 #ifdef ENABLE_IMPORT_PARQUET
3518  } else if (boost::iequals(*p->get_name(), "parquet")) {
3519  const StringLiteral* str_literal =
3520  dynamic_cast<const StringLiteral*>(p->get_value());
3521  if (str_literal == nullptr) {
3522  throw std::runtime_error("Parquet option must be a boolean.");
3523  }
3524  if (bool_from_string_literal(str_literal)) {
3525  // not sure a parquet "table" type is proper, but to make code
3526  // look consistent in some places, let's set "table" type too
3527  copy_params.file_type = Importer_NS::FileType::PARQUET;
3528  }
3529 #endif // ENABLE_IMPORT_PARQUET
3530  } else if (boost::iequals(*p->get_name(), "s3_access_key")) {
3531  const StringLiteral* str_literal =
3532  dynamic_cast<const StringLiteral*>(p->get_value());
3533  if (str_literal == nullptr) {
3534  throw std::runtime_error("Option s3_access_key must be a string.");
3535  }
3536  copy_params.s3_access_key = *str_literal->get_stringval();
3537  } else if (boost::iequals(*p->get_name(), "s3_secret_key")) {
3538  const StringLiteral* str_literal =
3539  dynamic_cast<const StringLiteral*>(p->get_value());
3540  if (str_literal == nullptr) {
3541  throw std::runtime_error("Option s3_secret_key must be a string.");
3542  }
3543  copy_params.s3_secret_key = *str_literal->get_stringval();
3544  } else if (boost::iequals(*p->get_name(), "s3_region")) {
3545  const StringLiteral* str_literal =
3546  dynamic_cast<const StringLiteral*>(p->get_value());
3547  if (str_literal == nullptr) {
3548  throw std::runtime_error("Option s3_region must be a string.");
3549  }
3550  copy_params.s3_region = *str_literal->get_stringval();
3551  } else if (boost::iequals(*p->get_name(), "s3_endpoint")) {
3552  const StringLiteral* str_literal =
3553  dynamic_cast<const StringLiteral*>(p->get_value());
3554  if (str_literal == nullptr) {
3555  throw std::runtime_error("Option s3_endpoint must be a string.");
3556  }
3557  copy_params.s3_endpoint = *str_literal->get_stringval();
3558  } else if (boost::iequals(*p->get_name(), "quote")) {
3559  const StringLiteral* str_literal =
3560  dynamic_cast<const StringLiteral*>(p->get_value());
3561  if (str_literal == nullptr) {
3562  throw std::runtime_error("Quote option must be a string.");
3563  } else if (str_literal->get_stringval()->length() != 1) {
3564  throw std::runtime_error("Quote must be a single character string.");
3565  }
3566  copy_params.quote = (*str_literal->get_stringval())[0];
3567  } else if (boost::iequals(*p->get_name(), "escape")) {
3568  const StringLiteral* str_literal =
3569  dynamic_cast<const StringLiteral*>(p->get_value());
3570  if (str_literal == nullptr) {
3571  throw std::runtime_error("Escape option must be a string.");
3572  } else if (str_literal->get_stringval()->length() != 1) {
3573  throw std::runtime_error("Escape must be a single character string.");
3574  }
3575  copy_params.escape = (*str_literal->get_stringval())[0];
3576  } else if (boost::iequals(*p->get_name(), "line_delimiter")) {
3577  const StringLiteral* str_literal =
3578  dynamic_cast<const StringLiteral*>(p->get_value());
3579  if (str_literal == nullptr) {
3580  throw std::runtime_error("Line_delimiter option must be a string.");
3581  } else if (str_literal->get_stringval()->length() != 1) {
3582  throw std::runtime_error("Line_delimiter must be a single character string.");
3583  }
3584  copy_params.line_delim = (*str_literal->get_stringval())[0];
3585  } else if (boost::iequals(*p->get_name(), "quoted")) {
3586  const StringLiteral* str_literal =
3587  dynamic_cast<const StringLiteral*>(p->get_value());
3588  if (str_literal == nullptr) {
3589  throw std::runtime_error("Quoted option must be a boolean.");
3590  }
3591  copy_params.quoted = bool_from_string_literal(str_literal);
3592  } else if (boost::iequals(*p->get_name(), "plain_text")) {
3593  const StringLiteral* str_literal =
3594  dynamic_cast<const StringLiteral*>(p->get_value());
3595  if (str_literal == nullptr) {
3596  throw std::runtime_error("plain_text option must be a boolean.");
3597  }
3598  copy_params.plain_text = bool_from_string_literal(str_literal);
3599  } else if (boost::iequals(*p->get_name(), "array_marker")) {
3600  const StringLiteral* str_literal =
3601  dynamic_cast<const StringLiteral*>(p->get_value());
3602  if (str_literal == nullptr) {
3603  throw std::runtime_error("Array Marker option must be a string.");
3604  } else if (str_literal->get_stringval()->length() != 2) {
3605  throw std::runtime_error(
3606  "Array Marker option must be exactly two characters. Default is {}.");
3607  }
3608  copy_params.array_begin = (*str_literal->get_stringval())[0];
3609  copy_params.array_end = (*str_literal->get_stringval())[1];
3610  } else if (boost::iequals(*p->get_name(), "array_delimiter")) {
3611  const StringLiteral* str_literal =
3612  dynamic_cast<const StringLiteral*>(p->get_value());
3613  if (str_literal == nullptr) {
3614  throw std::runtime_error("Array Delimiter option must be a string.");
3615  } else if (str_literal->get_stringval()->length() != 1) {
3616  throw std::runtime_error("Array Delimiter must be a single character string.");
3617  }
3618  copy_params.array_delim = (*str_literal->get_stringval())[0];
3619  } else if (boost::iequals(*p->get_name(), "lonlat")) {
3620  const StringLiteral* str_literal =
3621  dynamic_cast<const StringLiteral*>(p->get_value());
3622  if (str_literal == nullptr) {
3623  throw std::runtime_error("Lonlat option must be a boolean.");
3624  }
3625  copy_params.lonlat = bool_from_string_literal(str_literal);
3626  } else if (boost::iequals(*p->get_name(), "geo")) {
3627  const StringLiteral* str_literal =
3628  dynamic_cast<const StringLiteral*>(p->get_value());
3629  if (str_literal == nullptr) {
3630  throw std::runtime_error("Geo option must be a boolean.");
3631  }
3632  copy_params.file_type = bool_from_string_literal(str_literal)
3635  } else if (boost::iequals(*p->get_name(), "geo_coords_type")) {
3636  const StringLiteral* str_literal =
3637  dynamic_cast<const StringLiteral*>(p->get_value());
3638  if (str_literal == nullptr) {
3639  throw std::runtime_error("'geo_coords_type' option must be a string");
3640  }
3641  const std::string* s = str_literal->get_stringval();
3642  if (boost::iequals(*s, "geography")) {
3643  throw std::runtime_error(
3644  "GEOGRAPHY coords type not yet supported. Please use GEOMETRY.");
3645  // copy_params.geo_coords_type = kGEOGRAPHY;
3646  } else if (boost::iequals(*s, "geometry")) {
3647  copy_params.geo_coords_type = kGEOMETRY;
3648  } else {
3649  throw std::runtime_error(
3650  "Invalid string for 'geo_coords_type' option (must be 'GEOGRAPHY' or "
3651  "'GEOMETRY'): " +
3652  *s);
3653  }
3654  } else if (boost::iequals(*p->get_name(), "geo_coords_encoding")) {
3655  const StringLiteral* str_literal =
3656  dynamic_cast<const StringLiteral*>(p->get_value());
3657  if (str_literal == nullptr) {
3658  throw std::runtime_error("'geo_coords_encoding' option must be a string");
3659  }
3660  const std::string* s = str_literal->get_stringval();
3661  if (boost::iequals(*s, "none")) {
3662  copy_params.geo_coords_encoding = kENCODING_NONE;
3663  copy_params.geo_coords_comp_param = 0;
3664  } else if (boost::iequals(*s, "compressed(32)")) {
3665  copy_params.geo_coords_encoding = kENCODING_GEOINT;
3666  copy_params.geo_coords_comp_param = 32;
3667  } else {
3668  throw std::runtime_error(
3669  "Invalid string for 'geo_coords_encoding' option (must be 'NONE' or "
3670  "'COMPRESSED(32)'): " +
3671  *s);
3672  }
3673  } else if (boost::iequals(*p->get_name(), "geo_coords_srid")) {
3674  const IntLiteral* int_literal = dynamic_cast<const IntLiteral*>(p->get_value());
3675  if (int_literal == nullptr) {
3676  throw std::runtime_error("'geo_coords_srid' option must be an integer");
3677  }
3678  const int srid = int_literal->get_intval();
3679  if (srid == 4326 || srid == 3857 || srid == 900913) {
3680  copy_params.geo_coords_srid = srid;
3681  } else {
3682  throw std::runtime_error(
3683  "Invalid value for 'geo_coords_srid' option (must be 4326, 3857, or "
3684  "900913): " +
3685  std::to_string(srid));
3686  }
3687  } else if (boost::iequals(*p->get_name(), "geo_layer_name")) {
3688  const StringLiteral* str_literal =
3689  dynamic_cast<const StringLiteral*>(p->get_value());
3690  if (str_literal == nullptr) {
3691  throw std::runtime_error("'geo_layer_name' option must be a string");
3692  }
3693  const std::string* layer_name = str_literal->get_stringval();
3694  if (layer_name) {
3695  copy_params.geo_layer_name = *layer_name;
3696  } else {
3697  throw std::runtime_error("Invalid value for 'geo_layer_name' option");
3698  }
3699  } else if (boost::iequals(*p->get_name(), "partitions")) {
3700  if (copy_params.file_type == Importer_NS::FileType::POLYGON) {
3701  const auto partitions =
3702  static_cast<const StringLiteral*>(p->get_value())->get_stringval();
3703  CHECK(partitions);
3704  const auto partitions_uc = boost::to_upper_copy<std::string>(*partitions);
3705  if (partitions_uc != "REPLICATED") {
3706  throw std::runtime_error("PARTITIONS must be REPLICATED for geo COPY");
3707  }
3708  _geo_copy_from_partitions = partitions_uc;
3709  } else {
3710  throw std::runtime_error("PARTITIONS option not supported for non-geo COPY: " +
3711  *p->get_name());
3712  }
3713  } else if (boost::iequals(*p->get_name(), "geo_assign_render_groups")) {
3714  const StringLiteral* str_literal =
3715  dynamic_cast<const StringLiteral*>(p->get_value());
3716  if (str_literal == nullptr) {
3717  throw std::runtime_error("geo_assign_render_groups option must be a boolean.");
3718  }
3719  copy_params.geo_assign_render_groups = bool_from_string_literal(str_literal);
3720  } else if (boost::iequals(*p->get_name(), "geo_explode_collections")) {
3721  const StringLiteral* str_literal =
3722  dynamic_cast<const StringLiteral*>(p->get_value());
3723  if (str_literal == nullptr) {
3724  throw std::runtime_error("geo_explode_collections option must be a boolean.");
3725  }
3726  copy_params.geo_explode_collections = bool_from_string_literal(str_literal);
3727  } else {
3728  throw std::runtime_error("Invalid option for COPY: " + *p->get_name());
3729  }
3730  }
3731  }
3732 
3733  std::string tr;
3734  if (copy_params.file_type == Importer_NS::FileType::POLYGON) {
3735  // geo import
3736  // we do nothing here, except stash the parameters so we can
3737  // do the import when we unwind to the top of the handler
3738  _geo_copy_from_file_name = file_path;
3739  _geo_copy_from_copy_params = copy_params;
3740  _was_geo_copy_from = true;
3741 
3742  // the result string
3743  // @TODO simon.eves put something more useful in here
3744  // except we really can't because we haven't done the import yet!
3745  if (td) {
3746  tr = std::string("Appending geo to table '") + *table + std::string("'...");
3747  } else {
3748  tr = std::string("Creating table '") + *table +
3749  std::string("' and importing geo...");
3750  }
3751  } else {
3752  if (td) {
3753  // regular import
3754  auto importer = importer_factory(catalog, td, file_path, copy_params);
3755  auto ms = measure<>::execution([&]() {
3756  auto res = importer->import();
3757  rows_completed += res.rows_completed;
3758  rows_rejected += res.rows_rejected;
3759  load_truncated = res.load_truncated;
3760  });
3761  total_time += ms;
3762 
3763  // results
3764  if (load_truncated || rows_rejected > copy_params.max_reject) {
3765  LOG(ERROR) << "COPY exited early due to reject records count during multi file "
3766  "processing ";
3767  // if we have crossed the truncated load threshold
3768  load_truncated = true;
3769  }
3770  if (!load_truncated) {
3771  tr = std::string("Loaded: " + std::to_string(rows_completed) +
3772  " recs, Rejected: " + std::to_string(rows_rejected) +
3773  " recs in " + std::to_string((double)total_time / 1000.0) +
3774  " secs");
3775  } else {
3776  tr = std::string("Loader truncated due to reject count. Processed : " +
3777  std::to_string(rows_completed) + " recs, Rejected: " +
3778  std::to_string(rows_rejected) + " recs in " +
3779  std::to_string((double)total_time / 1000.0) + " secs");
3780  }
3781  } else {
3782  throw std::runtime_error("Table '" + *table + "' must exist before COPY FROM");
3783  }
3784  }
3785 
3786  return_message.reset(new std::string(tr));
3787  LOG(INFO) << tr;
3788 }
std::string null_str
Definition: CopyParams.h:47
static TimeT::rep execution(F func, Args &&...args)
Definition: sample.cpp:29
std::list< std::unique_ptr< NameValueAssign > > options
Definition: ParserNode.h:1412
#define LOG(tag)
Definition: Logger.h:188
std::unique_ptr< std::string > return_message
Definition: ParserNode.h:1389
static const AccessPrivileges INSERT_INTO_TABLE
Definition: DBObject.h:154
std::unique_ptr< std::string > table
Definition: ParserNode.h:1410
bool bool_from_string_literal(const Parser::StringLiteral *str_literal)
Definition: ParserNode.cpp:892
std::string to_string(char const *&&v)
EncodingType geo_coords_encoding
Definition: CopyParams.h:73
CHECK(cgen_state)
Importer_NS::CopyParams _geo_copy_from_copy_params
Definition: ParserNode.h:1416
std::string s3_access_key
Definition: CopyParams.h:62
std::string _geo_copy_from_partitions
Definition: ParserNode.h:1417
ImportHeaderRow has_header
Definition: CopyParams.h:48
std::string s3_endpoint
Definition: CopyParams.h:65
Catalog & getCatalog() const
Definition: SessionInfo.h:90
std::string s3_region
Definition: CopyParams.h:64
std::string geo_layer_name
Definition: CopyParams.h:78
std::unique_ptr< std::string > file_pattern
Definition: ParserNode.h:1411
specifies the content in-memory of a row in the table metadata table
std::string s3_secret_key
Definition: CopyParams.h:63
std::string _geo_copy_from_file_name
Definition: ParserNode.h:1415
const UserMetadata & get_currentUser() const
Definition: SessionInfo.h:93
int32_t geo_coords_comp_param
Definition: CopyParams.h:74

+ Here is the call graph for this function:

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 1398 of file ParserNode.h.

References _geo_copy_from_copy_params, _geo_copy_from_file_name, _geo_copy_from_partitions, _was_geo_copy_from, and table.

1401  {
1402  geo_copy_from_table = *table;
1403  geo_copy_from_file_name = _geo_copy_from_file_name;
1404  geo_copy_from_copy_params = _geo_copy_from_copy_params;
1405  geo_copy_from_partitions = _geo_copy_from_partitions;
1406  _was_geo_copy_from = false;
1407  }
std::unique_ptr< std::string > table
Definition: ParserNode.h:1410
Importer_NS::CopyParams _geo_copy_from_copy_params
Definition: ParserNode.h:1416
std::string _geo_copy_from_partitions
Definition: ParserNode.h:1417
std::string _geo_copy_from_file_name
Definition: ParserNode.h:1415
std::string& Parser::CopyTableStmt::get_table ( ) const
inline

Definition at line 1391 of file ParserNode.h.

References CHECK(), and table.

1391  {
1392  CHECK(table);
1393  return *table;
1394  }
std::unique_ptr< std::string > table
Definition: ParserNode.h:1410
CHECK(cgen_state)

+ Here is the call graph for this function:

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

Definition at line 1396 of file ParserNode.h.

References _was_geo_copy_from.

1396 { return _was_geo_copy_from; }

Member Data Documentation

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

Definition at line 1416 of file ParserNode.h.

Referenced by get_geo_copy_from_payload().

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

Definition at line 1415 of file ParserNode.h.

Referenced by get_geo_copy_from_payload().

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

Definition at line 1417 of file ParserNode.h.

Referenced by get_geo_copy_from_payload().

bool Parser::CopyTableStmt::_was_geo_copy_from = false
private

Definition at line 1414 of file ParserNode.h.

Referenced by get_geo_copy_from_payload(), and was_geo_copy_from().

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

Definition at line 1411 of file ParserNode.h.

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

Definition at line 1412 of file ParserNode.h.

Referenced by CopyTableStmt().

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

Definition at line 1389 of file ParserNode.h.

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

Definition at line 1410 of file ParserNode.h.

Referenced by get_geo_copy_from_payload(), and get_table().


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