This is an automated email from the ASF dual-hosted git repository.
qiaojialin pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-iotdb.git
The following commit(s) were added to refs/heads/master by this push:
new 67c0b62 fix autoCreateSchema in insertBatch
67c0b62 is described below
commit 67c0b62dbd7d1423a3ee2bf13683815a5bdb3d4a
Author: qiaojialin <[email protected]>
AuthorDate: Mon Jan 13 16:25:48 2020 +0800
fix autoCreateSchema in insertBatch
---
.../iotdb/db/qp/executor/QueryProcessExecutor.java | 37 +++++++++++++++-------
1 file changed, 26 insertions(+), 11 deletions(-)
diff --git
a/server/src/main/java/org/apache/iotdb/db/qp/executor/QueryProcessExecutor.java
b/server/src/main/java/org/apache/iotdb/db/qp/executor/QueryProcessExecutor.java
index 725d930..f2586bf 100644
---
a/server/src/main/java/org/apache/iotdb/db/qp/executor/QueryProcessExecutor.java
+++
b/server/src/main/java/org/apache/iotdb/db/qp/executor/QueryProcessExecutor.java
@@ -842,7 +842,32 @@ public class QueryProcessExecutor extends
AbstractQueryProcessExecutor {
}
/**
- * Add a seriesPath to MTree
+ * register with value
+ */
+ private void addPathToMTree(String deviceId, String measurementId, Object
value)
+ throws PathException, MetadataException, StorageEngineException {
+ TSDataType predictedDataType =
TypeInferenceUtils.getPredictedDataType(value);
+ String fullPath = deviceId + IoTDBConstant.PATH_SEPARATOR + measurementId;
+ TSEncoding encoding = getDefaultEncoding(predictedDataType);
+ CompressionType compressionType =
+
CompressionType.valueOf(TSFileDescriptor.getInstance().getConfig().getCompressor());
+ addPathToMTree(fullPath, predictedDataType, encoding, compressionType);
+ }
+
+ /**
+ * register with datatype
+ */
+ private void addPathToMTree(String deviceId, String measurementId,
TSDataType dataType)
+ throws PathException, MetadataException, StorageEngineException {
+ String fullPath = deviceId + IoTDBConstant.PATH_SEPARATOR + measurementId;
+ TSEncoding encoding = getDefaultEncoding(dataType);
+ CompressionType compressionType =
+
CompressionType.valueOf(TSFileDescriptor.getInstance().getConfig().getCompressor());
+ addPathToMTree(fullPath, dataType, encoding, compressionType);
+ }
+
+ /**
+ * Add a seriesPath to MTree, register with datatype, encoding and
compression
*/
private void addPathToMTree(String fullPath, TSDataType dataType, TSEncoding
encoding,
CompressionType compressionType)
@@ -855,16 +880,6 @@ public class QueryProcessExecutor extends
AbstractQueryProcessExecutor {
}
}
- private void addPathToMTree(String deviceId, String measurementId, Object
value)
- throws PathException, MetadataException, StorageEngineException {
- TSDataType predictedDataType =
TypeInferenceUtils.getPredictedDataType(value);
- String fullPath = deviceId + IoTDBConstant.PATH_SEPARATOR + measurementId;
- TSEncoding encoding = getDefaultEncoding(predictedDataType);
- CompressionType compressionType =
-
CompressionType.valueOf(TSFileDescriptor.getInstance().getConfig().getCompressor());
- addPathToMTree(fullPath, predictedDataType, encoding, compressionType);
- }
-
/**
* Get default encoding by dataType
*/