Github user jianqiao commented on a diff in the pull request:

    https://github.com/apache/incubator-quickstep/pull/291#discussion_r136197848
  
    --- Diff: query_optimizer/logical/CopyTo.hpp ---
    @@ -0,0 +1,141 @@
    +/**
    + * Licensed to the Apache Software Foundation (ASF) under one
    + * or more contributor license agreements.  See the NOTICE file
    + * distributed with this work for additional information
    + * regarding copyright ownership.  The ASF licenses this file
    + * to you under the Apache License, Version 2.0 (the
    + * "License"); you may not use this file except in compliance
    + * with the License.  You may obtain a copy of the License at
    + *
    + *   http://www.apache.org/licenses/LICENSE-2.0
    + *
    + * Unless required by applicable law or agreed to in writing,
    + * software distributed under the License is distributed on an
    + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    + * KIND, either express or implied.  See the License for the
    + * specific language governing permissions and limitations
    + * under the License.
    + **/
    +
    +#ifndef QUICKSTEP_QUERY_OPTIMIZER_LOGICAL_COPY_TO_HPP_
    +#define QUICKSTEP_QUERY_OPTIMIZER_LOGICAL_COPY_TO_HPP_
    +
    +#include <memory>
    +#include <string>
    +#include <vector>
    +
    +#include "query_optimizer/OptimizerTree.hpp"
    +#include "query_optimizer/expressions/AttributeReference.hpp"
    +#include "query_optimizer/logical/Logical.hpp"
    +#include "query_optimizer/logical/LogicalType.hpp"
    +#include "utility/BulkIOConfiguration.hpp"
    +#include "utility/Macros.hpp"
    +
    +#include "glog/logging.h"
    +
    +namespace quickstep {
    +namespace optimizer {
    +namespace logical {
    +
    +/** \addtogroup OptimizerLogical
    + *  @{
    + */
    +
    +class CopyTo;
    +typedef std::shared_ptr<const CopyTo> CopyToPtr;
    +
    +/**
    + * @brief Represents an operation that copies data from a relation to a 
text file.
    + */
    +class CopyTo : public Logical {
    + public:
    +  LogicalType getLogicalType() const override {
    +    return LogicalType::kCopyTo;
    +  }
    +
    +  std::string getName() const override {
    +    return "CopyTo";
    +  }
    +
    +  /**
    +   * @return The input relation whose data is to be exported.
    +   */
    +  const LogicalPtr& input() const {
    +    return input_;
    +  }
    +
    +  /**
    +   * @return The name of the file to write the data to.
    +   */
    +  const std::string& file_name() const {
    +    return file_name_;
    +  }
    +
    +  /**
    +   * @return The options for this COPY TO statement.
    +   */
    +  BulkIOConfigurationPtr options() const {
    --- End diff --
    
    Updated.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to