// Path: src/main/java/com/basho/riak/presto/models/RiakColumnHandle.java
// public final class RiakColumnHandle
//         implements ColumnHandle {
//     public static final String PKEY_COLUMN_NAME = "__key";
//     public static final String VTAG_COLUMN_NAME = "__vtag";
// 
//     private static final Logger log = Logger.get(RiakColumnHandle.class);
//     private final String connectorId;
//     private final RiakColumn column;
//     private final int ordinalPosition;
// 
//     @JsonCreator
//     public RiakColumnHandle(
//             @JsonProperty(value = "connectorId", required = true) String connectorId,
//             @JsonProperty(value = "column", required = true) RiakColumn column,
//             @JsonProperty("ordinalPosition") int ordinalPosition) {
//         this.connectorId = checkNotNull(connectorId, "connectorId is null");
//         this.column = checkNotNull(column, "column is null");
//         this.ordinalPosition = ordinalPosition;
//     }
// 
//     @JsonProperty
//     public String getConnectorId() {
//         return connectorId;
//     }
// 
//     @JsonProperty
//     public RiakColumn getColumn() {
//         return column;
//     }
// 
//     @JsonProperty
//     public int getOrdinalPosition() {
//         return ordinalPosition;
//     }
// 
//     @Override
//     public int hashCode() {
//         return Objects.hashCode(connectorId, column);
//     }
// 
//     @Override
//     public boolean equals(Object obj) {
//         if (this == obj) {
//             return true;
//         }
//         if ((obj == null) || (getClass() != obj.getClass())) {
//             return false;
//         }
// 
//         RiakColumnHandle other = (RiakColumnHandle) obj;
//         return Objects.equal(this.connectorId, other.connectorId) &&
//                 this.column.equals(other.column) &&
//                 this.ordinalPosition == other.ordinalPosition;
//     }
// 
//     @Override
//     public String toString() {
//         return MoreObjects.toStringHelper(this)
//                 .add("connectorId", connectorId)
//                 .add("column", column)
//                 .add("ordinalPosition", ordinalPosition)
//                 .toString();
//     }
// 
//     public boolean matchAndBothHasIndex(RiakColumnHandle rhs)
//     {
//         return getColumn().getName().equals(rhs.getColumn().getName())
//                 && getColumn().getType().equals(rhs.getColumn().getType())
//                 && getColumn().getIndex()
//                 && rhs.getColumn().getIndex();
//     }
// }


import com.basho.riak.client.core.util.BinaryValue;
import com.basho.riak.presto.models.RiakColumnHandle;
import com.facebook.presto.spi.HostAddress;
import com.facebook.presto.spi.RecordCursor;
import com.facebook.presto.spi.type.BigintType;
import com.facebook.presto.spi.type.BooleanType;
import com.facebook.presto.spi.type.DoubleType;
import com.facebook.presto.spi.type.Type;
import com.google.common.base.Strings;
import io.airlift.log.Logger;
import io.airlift.slice.Slice;
import java.util.List;
import java.util.Map;
import static com.google.common.base.Preconditions.*;
/*
 * Licensed 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.
 */
package com.basho.riak.presto;




public class RiakRecordCursor
        implements RecordCursor {
    private static final Logger log = Logger.get(RiakRecordCursor.class);

    //private static final Splitter LINE_SPLITTER = Splitter.on(",").trimResults();

    private final BinaryValue schemaName;
    private final BinaryValue tableName;
// Path: src/main/java/com/basho/riak/presto/models/RiakColumnHandle.java
// public final class RiakColumnHandle
//         implements ColumnHandle {
//     public static final String PKEY_COLUMN_NAME = "__key";
//     public static final String VTAG_COLUMN_NAME = "__vtag";
// 
//     private static final Logger log = Logger.get(RiakColumnHandle.class);
//     private final String connectorId;
//     private final RiakColumn column;
//     private final int ordinalPosition;
// 
//     @JsonCreator
//     public RiakColumnHandle(
//             @JsonProperty(value = "connectorId", required = true) String connectorId,
//             @JsonProperty(value = "column", required = true) RiakColumn column,
//             @JsonProperty("ordinalPosition") int ordinalPosition) {
//         this.connectorId = checkNotNull(connectorId, "connectorId is null");
//         this.column = checkNotNull(column, "column is null");
//         this.ordinalPosition = ordinalPosition;
//     }
// 
//     @JsonProperty
//     public String getConnectorId() {
//         return connectorId;
//     }
// 
//     @JsonProperty
//     public RiakColumn getColumn() {
//         return column;
//     }
// 
//     @JsonProperty
//     public int getOrdinalPosition() {
//         return ordinalPosition;
//     }
// 
//     @Override
//     public int hashCode() {
//         return Objects.hashCode(connectorId, column);
//     }
// 
//     @Override
//     public boolean equals(Object obj) {
//         if (this == obj) {
//             return true;
//         }
//         if ((obj == null) || (getClass() != obj.getClass())) {
//             return false;
//         }
// 
//         RiakColumnHandle other = (RiakColumnHandle) obj;
//         return Objects.equal(this.connectorId, other.connectorId) &&
//                 this.column.equals(other.column) &&
//                 this.ordinalPosition == other.ordinalPosition;
//     }
// 
//     @Override
//     public String toString() {
//         return MoreObjects.toStringHelper(this)
//                 .add("connectorId", connectorId)
//                 .add("column", column)
//                 .add("ordinalPosition", ordinalPosition)
//                 .toString();
//     }
// 
//     public boolean matchAndBothHasIndex(RiakColumnHandle rhs)
//     {
//         return getColumn().getName().equals(rhs.getColumn().getName())
//                 && getColumn().getType().equals(rhs.getColumn().getType())
//                 && getColumn().getIndex()
//                 && rhs.getColumn().getIndex();
//     }
// }


// Path: src/main/java/com/basho/riak/presto/RiakRecordCursor.java
import com.basho.riak.client.core.util.BinaryValue;
import com.basho.riak.presto.models.RiakColumnHandle;
import com.facebook.presto.spi.HostAddress;
import com.facebook.presto.spi.RecordCursor;
import com.facebook.presto.spi.type.BigintType;
import com.facebook.presto.spi.type.BooleanType;
import com.facebook.presto.spi.type.DoubleType;
import com.facebook.presto.spi.type.Type;
import com.google.common.base.Strings;
import io.airlift.log.Logger;
import io.airlift.slice.Slice;
import java.util.List;
import java.util.Map;
import static com.google.common.base.Preconditions.*;

/*
 * Licensed 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.
 */
package com.basho.riak.presto;




public class RiakRecordCursor
        implements RecordCursor {
    private static final Logger log = Logger.get(RiakRecordCursor.class);

    //private static final Splitter LINE_SPLITTER = Splitter.on(",").trimResults();

    private final BinaryValue schemaName;
    private final BinaryValue tableName;
    private final List<RiakColumnHandle> columnHandles;