提交 1e1e9473 编写于 作者: H Haojun Liao

[TD-225]

上级 71fe2885
......@@ -89,7 +89,7 @@ public class TSDBDriver extends AbstractTaosDriver {
/**
* fetch data from native function in a batch model
*/
public static final String PROPERTY_KEY_BATCH_LOAD = "batch";
public static final String PROPERTY_KEY_BATCH_LOAD = "batchfetch";
private TSDBDatabaseMetaData dbMetaData = null;
......
......@@ -31,8 +31,6 @@ import java.util.List;
public class TSDBResultSetBlockData {
private int numOfRows = 0;
private int numOfCols = 0;
private int rowIndex = 0;
private List<ColumnMetaData> columnMetaDataList;
......@@ -40,22 +38,20 @@ public class TSDBResultSetBlockData {
public TSDBResultSetBlockData(List<ColumnMetaData> colMeta, int numOfCols) {
this.columnMetaDataList = colMeta;
this.setNumOfCols(numOfCols);
this.colData = new ArrayList<Object>(numOfCols);
}
public TSDBResultSetBlockData() {
this.colData = new ArrayList<Object>();
this.setNumOfCols(0);
}
public void clear() {
int size = this.colData.size();
if (this.colData != null) {
this.colData.clear();
}
if (this.numOfCols == 0) {
return;
}
setNumOfCols(size);
}
public int getNumOfRows() {
......@@ -67,12 +63,12 @@ public class TSDBResultSetBlockData {
}
public int getNumOfCols() {
return numOfCols;
return this.colData.size();
}
public void setNumOfCols(int numOfCols) {
this.numOfCols = numOfCols;
this.clear();
this.colData = new ArrayList<Object>(numOfCols);
this.colData.addAll(Collections.nCopies(numOfCols, null));
}
public boolean hasMore() {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册