[
https://issues.apache.org/jira/browse/TAJO-1340?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14740733#comment-14740733
]
ASF GitHub Bot commented on TAJO-1340:
--------------------------------------
Github user hyunsik commented on a diff in the pull request:
https://github.com/apache/tajo/pull/671#discussion_r39267724
--- Diff:
tajo-client/src/main/java/org/apache/tajo/jdbc/TajoMemoryResultSet.java ---
@@ -18,46 +18,78 @@
package org.apache.tajo.jdbc;
-import com.google.protobuf.ByteString;
+import io.netty.buffer.Unpooled;
import org.apache.tajo.QueryId;
import org.apache.tajo.catalog.Schema;
-import org.apache.tajo.storage.RowStoreUtil;
+import org.apache.tajo.catalog.SchemaUtil;
+import org.apache.tajo.exception.TajoInternalError;
+import org.apache.tajo.ipc.ClientProtos.SerializedResultSet;
import org.apache.tajo.storage.Tuple;
+import org.apache.tajo.tuple.RowBlockReader;
+import org.apache.tajo.tuple.memory.HeapRowBlockReader;
+import org.apache.tajo.tuple.memory.HeapTuple;
+import org.apache.tajo.tuple.memory.MemoryBlock;
+import org.apache.tajo.tuple.memory.ResizableMemoryBlock;
+import org.apache.tajo.util.CompressionUtil;
import java.io.IOException;
import java.sql.SQLException;
-import java.util.List;
import java.util.Map;
-import java.util.concurrent.atomic.AtomicBoolean;
public class TajoMemoryResultSet extends TajoResultSetBase {
- private List<ByteString> serializedTuples;
- private AtomicBoolean closed = new AtomicBoolean(false);
- private RowStoreUtil.RowStoreDecoder decoder;
+ private MemoryBlock memory;
+ private RowBlockReader reader;
+ private volatile boolean closed;
- public TajoMemoryResultSet(QueryId queryId, Schema schema,
List<ByteString> serializedTuples, int maxRowNum,
+
+ public TajoMemoryResultSet(QueryId queryId, Schema schema,
SerializedResultSet resultSet,
Map<String, String> clientSideSessionVars) {
super(queryId, schema, clientSideSessionVars);
- this.totalRow = maxRowNum;
- this.serializedTuples = serializedTuples;
- this.decoder = RowStoreUtil.createDecoder(schema);
+ if(resultSet != null && resultSet.getRows() > 0) {
+ this.totalRow = resultSet.getRows();
+
+ try {
+ // decompress if has a codec
--- End diff --
It should be ``decompress if it has a codec`` or ``decompress if a codec is
specified``.
> Change the default output file format.
> --------------------------------------
>
> Key: TAJO-1340
> URL: https://issues.apache.org/jira/browse/TAJO-1340
> Project: Tajo
> Issue Type: Improvement
> Components: Java Client, JDBC Driver, Offheap, Storage
> Reporter: Hyunsik Choi
> Assignee: Jinho Kim
> Fix For: 0.11.0, 0.12.0
>
> Attachments: TAJO-1340.patch, TAJO-1340_2.patch
>
>
> Currently, the default output file is CSV. Due to its nature, CSV has mainly
> three problems:
> * Its line or field delimiter can be duplicated to some character included
> in the result data.
> * Plan text file is likely to be larger than other file formats.
> * Its read and write performance is slow.
> We need to change the default output file format into other file formats. We
> also need to investigate which file format is the best for it.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)