[GitHub] [incubator-iotdb] sonarcloud[bot] removed a comment on pull request #1752: [IOTDB-904] fix update last cache NullPointerException
sonarcloud[bot] removed a comment on pull request #1752: URL: https://github.com/apache/incubator-iotdb/pull/1752#issuecomment-697118545 Kudos, SonarCloud Quality Gate passed! [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1752=false=BUG) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1752=false=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1752=false=BUG) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1752=false=VULNERABILITY) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1752=false=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1752=false=VULNERABILITY) (and [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1752=false=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/i ssues?id=apache_incubator-iotdb=1752=false=SECURITY_HOTSPOT) to review) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1752=false=CODE_SMELL) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1752=false=CODE_SMELL) [2 Code Smells](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1752=false=CODE_SMELL) [](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb=1752) No Coverage information [](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb=1752=new_duplicated_lines_density=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb=1752=new_duplicated_lines_density=list) The version of Java (1.8.0_252) you have used to run this analysis is deprecated and we will stop accepting it from October 2020. Please update to at least Java 11. Read more [here](https://sonarcloud.io/documentation/upcoming/) This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [incubator-iotdb] sonarcloud[bot] commented on pull request #1752: [IOTDB-904] fix update last cache NullPointerException
sonarcloud[bot] commented on pull request #1752: URL: https://github.com/apache/incubator-iotdb/pull/1752#issuecomment-697147122 Kudos, SonarCloud Quality Gate passed! [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1752=false=BUG) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1752=false=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1752=false=BUG) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1752=false=VULNERABILITY) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1752=false=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1752=false=VULNERABILITY) (and [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1752=false=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/i ssues?id=apache_incubator-iotdb=1752=false=SECURITY_HOTSPOT) to review) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1752=false=CODE_SMELL) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1752=false=CODE_SMELL) [0 Code Smells](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1752=false=CODE_SMELL) [](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb=1752) No Coverage information [](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb=1752=new_duplicated_lines_density=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb=1752=new_duplicated_lines_density=list) The version of Java (1.8.0_252) you have used to run this analysis is deprecated and we will stop accepting it from October 2020. Please update to at least Java 11. Read more [here](https://sonarcloud.io/documentation/upcoming/) This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [incubator-iotdb] qiaojialin opened a new pull request #1753: set props to null by default in createTimeseries to save memory
qiaojialin opened a new pull request #1753: URL: https://github.com/apache/incubator-iotdb/pull/1753 This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [incubator-iotdb] qiaojialin commented on pull request #1633: [IOTDB-845]Enable to stop iotdb server by iotdb.IoTDB
qiaojialin commented on pull request #1633: URL: https://github.com/apache/incubator-iotdb/pull/1633#issuecomment-697138525 Hi, please recover the set memory in iotdb-env.bat This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [incubator-iotdb] qiaojialin merged pull request #1722: [IOTDB-872] Use system timezone in CLI
qiaojialin merged pull request #1722: URL: https://github.com/apache/incubator-iotdb/pull/1722 This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [incubator-iotdb] sonarcloud[bot] commented on pull request #1524: [IOTDB-776] Control the memory usage of flushing the memtable
sonarcloud[bot] commented on pull request #1524: URL: https://github.com/apache/incubator-iotdb/pull/1524#issuecomment-697115354 Kudos, SonarCloud Quality Gate passed! [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1524=false=BUG) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1524=false=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1524=false=BUG) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1524=false=VULNERABILITY) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1524=false=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1524=false=VULNERABILITY) (and [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1524=false=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/i ssues?id=apache_incubator-iotdb=1524=false=SECURITY_HOTSPOT) to review) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1524=false=CODE_SMELL) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1524=false=CODE_SMELL) [12 Code Smells](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1524=false=CODE_SMELL) [](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb=1524) No Coverage information [](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb=1524=new_duplicated_lines_density=list) [0.4% Duplication](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb=1524=new_duplicated_lines_density=list) The version of Java (1.8.0_252) you have used to run this analysis is deprecated and we will stop accepting it from October 2020. Please update to at least Java 11. Read more [here](https://sonarcloud.io/documentation/upcoming/) This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [incubator-iotdb] qiaojialin commented on a change in pull request #1752: [IOTDB-904] fix update last cache NullPointerException
qiaojialin commented on a change in pull request #1752: URL: https://github.com/apache/incubator-iotdb/pull/1752#discussion_r493195177 ## File path: server/src/main/java/org/apache/iotdb/db/qp/physical/crud/InsertPlan.java ## @@ -70,12 +68,12 @@ public void setDataTypes(TSDataType[] dataTypes) { this.dataTypes = dataTypes; } - public MeasurementSchema[] getSchemas() { -return schemas; + public MeasurementMNode[] getMNodes() { +return mNodes; Review comment: fixed This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [incubator-iotdb] liutaohua commented on a change in pull request #1731: [IOTDB-870] tags and attributes output
liutaohua commented on a change in pull request #1731: URL: https://github.com/apache/incubator-iotdb/pull/1731#discussion_r492644306 ## File path: server/src/main/java/org/apache/iotdb/db/metadata/MManager.java ## @@ -937,12 +937,11 @@ public int getNodesCountInGivenLevel(PartialPath prefixPath, int level) throws M try { Pair, Map> pair = Review comment: Change to a more meaningful name, like `tagAndAttributePair` ## File path: server/src/main/java/org/apache/iotdb/db/metadata/MManager.java ## @@ -1003,18 +1002,13 @@ private boolean match(PartialPath fullPath, String[] prefixNodes) { for (Pair ansString : ans) { long tagFileOffset = Long.parseLong(ansString.right[5]); try { - if (tagFileOffset < 0) { -// no tags/attributes -res.add(new ShowTimeSeriesResult(ansString.left.getFullPath(), ansString.right[0], ansString.right[1], ansString.right[2], -ansString.right[3], ansString.right[4], Collections.emptyMap())); - } else { -// has tags/attributes -Pair, Map> pair = -tagLogFile.read(config.getTagAttributeTotalSize(), tagFileOffset); -pair.left.putAll(pair.right); -res.add(new ShowTimeSeriesResult(ansString.left.getFullPath(), ansString.right[0], ansString.right[1], ansString.right[2], -ansString.right[3], ansString.right[4], pair.left)); + Pair, Map> pair = new Pair<>(Collections.emptyMap(),Collections.emptyMap()); Review comment: same ## File path: server/src/main/java/org/apache/iotdb/db/qp/executor/PlanExecutor.java ## @@ -566,7 +567,7 @@ private QueryDataSet processShowStorageGroup(ShowStorageGroupPlan showStorageGro private QueryDataSet processShowTimeseries(ShowTimeSeriesPlan showTimeSeriesPlan, QueryContext context) throws MetadataException { List timeseriesList = showTimeseries(showTimeSeriesPlan, context); -return QueryUtils.getQueryDataSet(timeseriesList, showTimeSeriesPlan, context); +return new ShowTimeseriesDataSet(showTimeSeriesPlan, context, timeseriesList); } protected List showTimeseries(ShowTimeSeriesPlan plan, QueryContext context) Review comment: I think this method can be removed, or move it to `ShowTimeseriesDataSet` ## File path: server/src/main/java/org/apache/iotdb/db/query/dataset/ShowTimeseriesDataSet.java ## @@ -19,44 +19,123 @@ package org.apache.iotdb.db.query.dataset; -import static org.apache.iotdb.db.utils.QueryUtils.transferShowTimeSeriesResultToRecordList; - +import static org.apache.iotdb.db.conf.IoTDBConstant.COLUMN_ATTRIBUTE; +import static org.apache.iotdb.db.conf.IoTDBConstant.COLUMN_STORAGE_GROUP; +import static org.apache.iotdb.db.conf.IoTDBConstant.COLUMN_TAG; +import static org.apache.iotdb.db.conf.IoTDBConstant.COLUMN_TIMESERIES; +import static org.apache.iotdb.db.conf.IoTDBConstant.COLUMN_TIMESERIES_ALIAS; +import static org.apache.iotdb.db.conf.IoTDBConstant.COLUMN_TIMESERIES_COMPRESSION; +import static org.apache.iotdb.db.conf.IoTDBConstant.COLUMN_TIMESERIES_DATATYPE; +import static org.apache.iotdb.db.conf.IoTDBConstant.COLUMN_TIMESERIES_ENCODING; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; import org.apache.iotdb.db.exception.metadata.MetadataException; import org.apache.iotdb.db.metadata.MManager; import org.apache.iotdb.db.metadata.PartialPath; import org.apache.iotdb.db.qp.physical.sys.ShowTimeSeriesPlan; import org.apache.iotdb.db.query.context.QueryContext; import org.apache.iotdb.tsfile.file.metadata.enums.TSDataType; +import org.apache.iotdb.tsfile.read.common.Field; import org.apache.iotdb.tsfile.read.common.Path; import org.apache.iotdb.tsfile.read.common.RowRecord; import org.apache.iotdb.tsfile.read.query.dataset.QueryDataSet; +import org.apache.iotdb.tsfile.utils.Binary; import org.slf4j.Logger; import org.slf4j.LoggerFactory; public class ShowTimeseriesDataSet extends QueryDataSet { private static final Logger logger = LoggerFactory.getLogger(ShowTimeseriesDataSet.class); - private final ShowTimeSeriesPlan plan; private List result = new ArrayList<>(); private int index = 0; private QueryContext context; + private List timeseriesList; + private boolean hasSetRecord; public boolean hasLimit = true; - public ShowTimeseriesDataSet(List paths, List dataTypes, - ShowTimeSeriesPlan showTimeSeriesPlan, QueryContext context) { -super(new ArrayList<>(paths), dataTypes); + private static Path[] resourcePaths = {new PartialPath(COLUMN_TIMESERIES, false), + new PartialPath(COLUMN_TIMESERIES_ALIAS, false), new PartialPath(COLUMN_STORAGE_GROUP, false), + new PartialPath(COLUMN_TIMESERIES_DATATYPE, false), new
[GitHub] [incubator-iotdb] sonarcloud[bot] commented on pull request #1752: [IOTDB-904] fix update last cache NullPointerException
sonarcloud[bot] commented on pull request #1752: URL: https://github.com/apache/incubator-iotdb/pull/1752#issuecomment-697118545 Kudos, SonarCloud Quality Gate passed! [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1752=false=BUG) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1752=false=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1752=false=BUG) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1752=false=VULNERABILITY) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1752=false=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1752=false=VULNERABILITY) (and [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1752=false=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/i ssues?id=apache_incubator-iotdb=1752=false=SECURITY_HOTSPOT) to review) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1752=false=CODE_SMELL) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1752=false=CODE_SMELL) [2 Code Smells](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1752=false=CODE_SMELL) [](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb=1752) No Coverage information [](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb=1752=new_duplicated_lines_density=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb=1752=new_duplicated_lines_density=list) The version of Java (1.8.0_252) you have used to run this analysis is deprecated and we will stop accepting it from October 2020. Please update to at least Java 11. Read more [here](https://sonarcloud.io/documentation/upcoming/) This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [incubator-iotdb] sonarcloud[bot] removed a comment on pull request #1524: [IOTDB-776] Control the memory usage of flushing the memtable
sonarcloud[bot] removed a comment on pull request #1524: URL: https://github.com/apache/incubator-iotdb/pull/1524#issuecomment-694144147 Kudos, SonarCloud Quality Gate passed! [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1524=false=BUG) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1524=false=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1524=false=BUG) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1524=false=VULNERABILITY) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1524=false=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1524=false=VULNERABILITY) (and [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1524=false=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/i ssues?id=apache_incubator-iotdb=1524=false=SECURITY_HOTSPOT) to review) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1524=false=CODE_SMELL) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1524=false=CODE_SMELL) [10 Code Smells](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1524=false=CODE_SMELL) [](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb=1524) No Coverage information [](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb=1524=new_duplicated_lines_density=list) [0.4% Duplication](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb=1524=new_duplicated_lines_density=list) The version of Java (1.8.0_252) you have used to run this analysis is deprecated and we will stop accepting it from October 2020. Please update to at least Java 11. Read more [here](https://sonarcloud.io/documentation/upcoming/) This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [incubator-iotdb] HTHou commented on a change in pull request #1752: [IOTDB-904] fix update last cache NullPointerException
HTHou commented on a change in pull request #1752: URL: https://github.com/apache/incubator-iotdb/pull/1752#discussion_r493181498 ## File path: server/src/main/java/org/apache/iotdb/db/qp/physical/crud/InsertPlan.java ## @@ -70,12 +68,12 @@ public void setDataTypes(TSDataType[] dataTypes) { this.dataTypes = dataTypes; } - public MeasurementSchema[] getSchemas() { -return schemas; + public MeasurementMNode[] getMNodes() { +return mNodes; Review comment: ```suggestion public MeasurementMNode[] getMeasurementMNodes() { return mNodes; ``` This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [incubator-iotdb] qiaojialin merged pull request #1748: Fix concurrency problem when auto register timeseries fix #1408
qiaojialin merged pull request #1748: URL: https://github.com/apache/incubator-iotdb/pull/1748 This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [incubator-iotdb] neuyilan commented on a change in pull request #1749: Avoid type conversion when encoding MeasureSchema
neuyilan commented on a change in pull request #1749: URL: https://github.com/apache/incubator-iotdb/pull/1749#discussion_r492568246 ## File path: tsfile/src/main/java/org/apache/iotdb/tsfile/write/schema/MeasurementSchema.java ## @@ -98,12 +98,11 @@ public static MeasurementSchema deserializeFrom(InputStream inputStream) throws measurementSchema.measurementId = ReadWriteIOUtils.readString(inputStream); Review comment: Add one UT of the serialize and deserialize method ## File path: tsfile/src/main/java/org/apache/iotdb/tsfile/file/metadata/enums/TSEncoding.java ## @@ -51,6 +51,35 @@ public static TSEncoding deserialize(short i) { } } + /** + * give an byte to return a encoding type. + * + * @param i byte number + * @return encoding type + */ + public static TSEncoding byteToEnum(byte i) { +switch (i) { Review comment: better to check the size of this parameter as TSDataType This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [incubator-iotdb] yhwangBonc commented on a change in pull request #1749: Avoid type conversion when encoding MeasureSchema
yhwangBonc commented on a change in pull request #1749: URL: https://github.com/apache/incubator-iotdb/pull/1749#discussion_r492563096 ## File path: tsfile/src/main/java/org/apache/iotdb/tsfile/file/metadata/enums/CompressionType.java ## @@ -52,6 +52,35 @@ public static CompressionType deserialize(short i) { } } + /** + * give an byte to return a compression type. + * + * @param i byte number + * @return CompressionType + */ + public static CompressionType byteToEnum(byte i) { Review comment: It's my negligence. I'll change it ## File path: tsfile/src/main/java/org/apache/iotdb/tsfile/file/metadata/enums/TSEncoding.java ## @@ -51,6 +51,35 @@ public static TSEncoding deserialize(short i) { } } + /** + * give an byte to return a encoding type. + * + * @param i byte number + * @return encoding type + */ + public static TSEncoding byteToEnum(byte i) { +switch (i) { Review comment: Copy that. I'll change it ## File path: tsfile/src/main/java/org/apache/iotdb/tsfile/write/schema/MeasurementSchema.java ## @@ -98,12 +98,11 @@ public static MeasurementSchema deserializeFrom(InputStream inputStream) throws measurementSchema.measurementId = ReadWriteIOUtils.readString(inputStream); Review comment: OK, I'll add it This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [incubator-iotdb] qiaojialin commented on a change in pull request #1642: In Session, the JDBC module can set the Boolean return data type to 0/1 or true/false.
qiaojialin commented on a change in pull request #1642: URL: https://github.com/apache/incubator-iotdb/pull/1642#discussion_r492468763 ## File path: session/src/main/java/org/apache/iotdb/session/SessionDataSet.java ## @@ -93,7 +93,12 @@ private RowRecord constructRowRecordFromValueArray() throws StatementExecutionEx switch (dataType) { case BOOLEAN: boolean booleanValue = BytesUtils.bytesToBool(valueBytes); -field.setBoolV(booleanValue); +if (org.apache.iotdb.rpc.Config.boolFormat == org.apache.iotdb.rpc.Config.Constant.BOOLEAN) { + field.setBoolV(booleanValue); +} else { + field = new Field(TSDataType.deserialize((short) 1)); + field.setIntV(booleanValue ? 1 : 0); +} Review comment: Hi, I think we should not change the type of Field. This issue only changes how the getString() method returns data. ## File path: session/src/test/java/org/apache/iotdb/session/IoTDBSessionSimpleIT.java ## @@ -66,6 +68,44 @@ public void tearDown() throws Exception { EnvironmentUtils.cleanEnv(); } + @Test + public void testBoolFormat() throws IoTDBConnectionException, StatementExecutionException { +Map map = new HashMap<>(); +map.put("boolFormat", "number"); +session = new Session("127.0.0.1", 6667, "root", "root", map); +session.open(); + +String deviceId = "root.sg1.d1"; +List measurements = new ArrayList<>(); +measurements.add("s1"); +measurements.add("s2"); +measurements.add("s3"); +measurements.add("s4"); + +List dataTypes = new ArrayList<>(); +dataTypes.add(TSDataType.INT64); +dataTypes.add(TSDataType.BOOLEAN); +dataTypes.add(TSDataType.TEXT); +dataTypes.add(TSDataType.TEXT); + +List values = new ArrayList<>(); +values.add(311L); +values.add(true); +values.add("String1"); +values.add("String2"); +session.insertRecord(deviceId, 1L, measurements, dataTypes, values); + +String expected = "1"; +SessionDataSet dataSet = session.executeQueryStatement("select s2 from root.sg1.d1"); +while (dataSet.hasNext()) { + List fields = dataSet.next().getFields(); Review comment: Hi, you could use the SessionDataSet.Iterator() to get the iterator and use the iterator.getString() that triggers the config. This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [incubator-iotdb] sonarcloud[bot] commented on pull request #1736: Cluster premerge
sonarcloud[bot] commented on pull request #1736: URL: https://github.com/apache/incubator-iotdb/pull/1736#issuecomment-696472524 This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [incubator-iotdb] mychaow commented on a change in pull request #1721: [IOTDB-868] fix comma bug for mlog
mychaow commented on a change in pull request #1721: URL: https://github.com/apache/incubator-iotdb/pull/1721#discussion_r489981747 ## File path: server/src/main/java/org/apache/iotdb/db/metadata/MTree.java ## @@ -1002,48 +1004,57 @@ private void findNodes(MNode node, PartialPath path, List res, int } public void serializeTo(String snapshotPath) throws IOException { -try (BufferedWriter bw = new BufferedWriter( -new FileWriter(SystemFileFactory.INSTANCE.getFile(snapshotPath { - root.serializeTo(bw); +try (MLogWriter mLogWriter = new MLogWriter(snapshotPath)) { + root.serializeTo(mLogWriter); } } @SuppressWarnings("squid:S3776") // Suppress high Cognitive Complexity warning public static MTree deserializeFrom(File mtreeSnapshot) { -try (BufferedReader br = new BufferedReader(new FileReader(mtreeSnapshot))) { - String s; + +try (MLogReader mlogReader = new MLogReader(mtreeSnapshot)) { Deque nodeStack = new ArrayDeque<>(); MNode node = null; - while ((s = br.readLine()) != null) { -String[] nodeInfo = s.split(","); -short nodeType = Short.parseShort(nodeInfo[0]); -if (nodeType == MetadataConstant.STORAGE_GROUP_MNODE_TYPE) { - node = StorageGroupMNode.deserializeFrom(nodeInfo); -} else if (nodeType == MetadataConstant.MEASUREMENT_MNODE_TYPE) { - node = MeasurementMNode.deserializeFrom(nodeInfo); -} else { - node = new MNode(null, nodeInfo[1]); -} + while (mlogReader.hasNext()) { +PhysicalPlan plan = null; +try { + plan = mlogReader.next(); + if (plan == null) { +continue; + } + int childrenSize = 0; + if (plan instanceof StorageGroupMNodePlan) { +node = StorageGroupMNode.deserializeFrom((StorageGroupMNodePlan) plan); +childrenSize = ((StorageGroupMNodePlan) plan).getChildSize(); + } else if (plan instanceof MeasurementMNodePlan) { +node = MeasurementMNode.deserializeFrom((MeasurementMNodePlan) plan); +childrenSize = ((MeasurementMNodePlan) plan).getChildSize(); + } else if (plan instanceof MNodePlan) { +node = new MNode(null, ((MNodePlan) plan).getName()); +childrenSize = ((MNodePlan) plan).getChildSize(); + } Review comment: I have done some tests, 1M timeseries, the cpu cost it almost same. This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [incubator-iotdb] SilverNarcissus commented on a change in pull request #1693: [IOTDB-863]: add a switch to drop ouf-of-order data that is recognized by IoTDB
SilverNarcissus commented on a change in pull request #1693: URL: https://github.com/apache/incubator-iotdb/pull/1693#discussion_r492513870 ## File path: server/src/test/java/org/apache/iotdb/db/engine/storagegroup/StorageGroupProcessorTest.java ## @@ -26,6 +26,7 @@ import java.util.Collections; Review comment: use this line to change the time partition and add some test over different time partition. ```IoTDBDescriptor.getInstance().getConfig().setPartitionInterval(100);``` do not forget to set it back to original value. You can refer to ```IoTDBMultiSeriesIT.java``` for this. Thank you very much XD This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [incubator-iotdb] sonarcloud[bot] commented on pull request #460: [IOTDB-68] New shared-nothing cluster
sonarcloud[bot] commented on pull request #460: URL: https://github.com/apache/incubator-iotdb/pull/460#issuecomment-696474324 This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [incubator-iotdb] mychaow commented on a change in pull request #1749: Avoid type conversion when encoding MeasureSchema
mychaow commented on a change in pull request #1749: URL: https://github.com/apache/incubator-iotdb/pull/1749#discussion_r492546747 ## File path: tsfile/src/main/java/org/apache/iotdb/tsfile/file/metadata/enums/CompressionType.java ## @@ -52,6 +52,35 @@ public static CompressionType deserialize(short i) { } } + /** + * give an byte to return a compression type. + * + * @param i byte number + * @return CompressionType + */ + public static CompressionType byteToEnum(byte i) { Review comment: byte i, why call this name This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [incubator-iotdb] sonarcloud[bot] removed a comment on pull request #460: [IOTDB-68] New shared-nothing cluster
sonarcloud[bot] removed a comment on pull request #460: URL: https://github.com/apache/incubator-iotdb/pull/460#issuecomment-690976244 This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [incubator-iotdb] sonarcloud[bot] commented on pull request #1748: Fix concurrency problem when auto register timeseries fix #1408
sonarcloud[bot] commented on pull request #1748: URL: https://github.com/apache/incubator-iotdb/pull/1748#issuecomment-696475148 Kudos, SonarCloud Quality Gate passed! [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1748=false=BUG) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1748=false=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1748=false=BUG) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1748=false=VULNERABILITY) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1748=false=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1748=false=VULNERABILITY) (and [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1748=false=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/i ssues?id=apache_incubator-iotdb=1748=false=SECURITY_HOTSPOT) to review) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1748=false=CODE_SMELL) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1748=false=CODE_SMELL) [0 Code Smells](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1748=false=CODE_SMELL) [](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb=1748) No Coverage information [](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb=1748=new_duplicated_lines_density=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb=1748=new_duplicated_lines_density=list) The version of Java (1.8.0_252) you have used to run this analysis is deprecated and we will stop accepting it from October 2020. Please update to at least Java 11. Read more [here](https://sonarcloud.io/documentation/upcoming/) This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [incubator-iotdb] sonarcloud[bot] removed a comment on pull request #1736: Cluster premerge
sonarcloud[bot] removed a comment on pull request #1736: URL: https://github.com/apache/incubator-iotdb/pull/1736#issuecomment-695891439 This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [incubator-iotdb] qiaojialin merged pull request #1747: fix ProgressBar bug
qiaojialin merged pull request #1747: URL: https://github.com/apache/incubator-iotdb/pull/1747 This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [incubator-iotdb] HTHou commented on a change in pull request #1752: [IOTDB-904] fix update last cache NullPointerException
HTHou commented on a change in pull request #1752: URL: https://github.com/apache/incubator-iotdb/pull/1752#discussion_r493181498 ## File path: server/src/main/java/org/apache/iotdb/db/qp/physical/crud/InsertPlan.java ## @@ -70,12 +68,12 @@ public void setDataTypes(TSDataType[] dataTypes) { this.dataTypes = dataTypes; } - public MeasurementSchema[] getSchemas() { -return schemas; + public MeasurementMNode[] getMNodes() { +return mNodes; Review comment: ```suggestion public MeasurementMNode[] getMeasurementMNodes() { return mNodes; ``` This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [incubator-iotdb] sonarcloud[bot] commented on pull request #1752: [IOTDB-904] fix update last cache NullPointerException
sonarcloud[bot] commented on pull request #1752: URL: https://github.com/apache/incubator-iotdb/pull/1752#issuecomment-697118545 Kudos, SonarCloud Quality Gate passed! [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1752=false=BUG) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1752=false=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1752=false=BUG) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1752=false=VULNERABILITY) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1752=false=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1752=false=VULNERABILITY) (and [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1752=false=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/i ssues?id=apache_incubator-iotdb=1752=false=SECURITY_HOTSPOT) to review) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1752=false=CODE_SMELL) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1752=false=CODE_SMELL) [2 Code Smells](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1752=false=CODE_SMELL) [](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb=1752) No Coverage information [](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb=1752=new_duplicated_lines_density=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb=1752=new_duplicated_lines_density=list) The version of Java (1.8.0_252) you have used to run this analysis is deprecated and we will stop accepting it from October 2020. Please update to at least Java 11. Read more [here](https://sonarcloud.io/documentation/upcoming/) This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [incubator-iotdb] sonarcloud[bot] removed a comment on pull request #1524: [IOTDB-776] Control the memory usage of flushing the memtable
sonarcloud[bot] removed a comment on pull request #1524: URL: https://github.com/apache/incubator-iotdb/pull/1524#issuecomment-694144147 Kudos, SonarCloud Quality Gate passed! [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1524=false=BUG) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1524=false=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1524=false=BUG) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1524=false=VULNERABILITY) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1524=false=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1524=false=VULNERABILITY) (and [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1524=false=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/i ssues?id=apache_incubator-iotdb=1524=false=SECURITY_HOTSPOT) to review) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1524=false=CODE_SMELL) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1524=false=CODE_SMELL) [10 Code Smells](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1524=false=CODE_SMELL) [](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb=1524) No Coverage information [](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb=1524=new_duplicated_lines_density=list) [0.4% Duplication](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb=1524=new_duplicated_lines_density=list) The version of Java (1.8.0_252) you have used to run this analysis is deprecated and we will stop accepting it from October 2020. Please update to at least Java 11. Read more [here](https://sonarcloud.io/documentation/upcoming/) This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [incubator-iotdb] sonarcloud[bot] commented on pull request #1524: [IOTDB-776] Control the memory usage of flushing the memtable
sonarcloud[bot] commented on pull request #1524: URL: https://github.com/apache/incubator-iotdb/pull/1524#issuecomment-697115354 Kudos, SonarCloud Quality Gate passed! [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1524=false=BUG) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1524=false=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1524=false=BUG) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1524=false=VULNERABILITY) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1524=false=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1524=false=VULNERABILITY) (and [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1524=false=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/i ssues?id=apache_incubator-iotdb=1524=false=SECURITY_HOTSPOT) to review) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1524=false=CODE_SMELL) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1524=false=CODE_SMELL) [12 Code Smells](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1524=false=CODE_SMELL) [](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb=1524) No Coverage information [](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb=1524=new_duplicated_lines_density=list) [0.4% Duplication](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb=1524=new_duplicated_lines_density=list) The version of Java (1.8.0_252) you have used to run this analysis is deprecated and we will stop accepting it from October 2020. Please update to at least Java 11. Read more [here](https://sonarcloud.io/documentation/upcoming/) This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [incubator-iotdb] qiaojialin opened a new pull request #1752: [IOTDB-904] fix update last cache NullPointerException
qiaojialin opened a new pull request #1752: URL: https://github.com/apache/incubator-iotdb/pull/1752 In previous, the deviceMNode is cached in the InsertPlan. Actually we could cache the MeasurementMNode directly instead of the MeasurementSchema and deviceMNode. This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [incubator-iotdb] liutaohua commented on a change in pull request #1731: [IOTDB-870] tags and attributes output
liutaohua commented on a change in pull request #1731: URL: https://github.com/apache/incubator-iotdb/pull/1731#discussion_r492644306 ## File path: server/src/main/java/org/apache/iotdb/db/metadata/MManager.java ## @@ -937,12 +937,11 @@ public int getNodesCountInGivenLevel(PartialPath prefixPath, int level) throws M try { Pair, Map> pair = Review comment: Change to a more meaningful name, like `tagAndAttributePair` ## File path: server/src/main/java/org/apache/iotdb/db/metadata/MManager.java ## @@ -1003,18 +1002,13 @@ private boolean match(PartialPath fullPath, String[] prefixNodes) { for (Pair ansString : ans) { long tagFileOffset = Long.parseLong(ansString.right[5]); try { - if (tagFileOffset < 0) { -// no tags/attributes -res.add(new ShowTimeSeriesResult(ansString.left.getFullPath(), ansString.right[0], ansString.right[1], ansString.right[2], -ansString.right[3], ansString.right[4], Collections.emptyMap())); - } else { -// has tags/attributes -Pair, Map> pair = -tagLogFile.read(config.getTagAttributeTotalSize(), tagFileOffset); -pair.left.putAll(pair.right); -res.add(new ShowTimeSeriesResult(ansString.left.getFullPath(), ansString.right[0], ansString.right[1], ansString.right[2], -ansString.right[3], ansString.right[4], pair.left)); + Pair, Map> pair = new Pair<>(Collections.emptyMap(),Collections.emptyMap()); Review comment: same ## File path: server/src/main/java/org/apache/iotdb/db/qp/executor/PlanExecutor.java ## @@ -566,7 +567,7 @@ private QueryDataSet processShowStorageGroup(ShowStorageGroupPlan showStorageGro private QueryDataSet processShowTimeseries(ShowTimeSeriesPlan showTimeSeriesPlan, QueryContext context) throws MetadataException { List timeseriesList = showTimeseries(showTimeSeriesPlan, context); -return QueryUtils.getQueryDataSet(timeseriesList, showTimeSeriesPlan, context); +return new ShowTimeseriesDataSet(showTimeSeriesPlan, context, timeseriesList); } protected List showTimeseries(ShowTimeSeriesPlan plan, QueryContext context) Review comment: I think this method can be removed, or move it to `ShowTimeseriesDataSet` ## File path: server/src/main/java/org/apache/iotdb/db/query/dataset/ShowTimeseriesDataSet.java ## @@ -19,44 +19,123 @@ package org.apache.iotdb.db.query.dataset; -import static org.apache.iotdb.db.utils.QueryUtils.transferShowTimeSeriesResultToRecordList; - +import static org.apache.iotdb.db.conf.IoTDBConstant.COLUMN_ATTRIBUTE; +import static org.apache.iotdb.db.conf.IoTDBConstant.COLUMN_STORAGE_GROUP; +import static org.apache.iotdb.db.conf.IoTDBConstant.COLUMN_TAG; +import static org.apache.iotdb.db.conf.IoTDBConstant.COLUMN_TIMESERIES; +import static org.apache.iotdb.db.conf.IoTDBConstant.COLUMN_TIMESERIES_ALIAS; +import static org.apache.iotdb.db.conf.IoTDBConstant.COLUMN_TIMESERIES_COMPRESSION; +import static org.apache.iotdb.db.conf.IoTDBConstant.COLUMN_TIMESERIES_DATATYPE; +import static org.apache.iotdb.db.conf.IoTDBConstant.COLUMN_TIMESERIES_ENCODING; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; import org.apache.iotdb.db.exception.metadata.MetadataException; import org.apache.iotdb.db.metadata.MManager; import org.apache.iotdb.db.metadata.PartialPath; import org.apache.iotdb.db.qp.physical.sys.ShowTimeSeriesPlan; import org.apache.iotdb.db.query.context.QueryContext; import org.apache.iotdb.tsfile.file.metadata.enums.TSDataType; +import org.apache.iotdb.tsfile.read.common.Field; import org.apache.iotdb.tsfile.read.common.Path; import org.apache.iotdb.tsfile.read.common.RowRecord; import org.apache.iotdb.tsfile.read.query.dataset.QueryDataSet; +import org.apache.iotdb.tsfile.utils.Binary; import org.slf4j.Logger; import org.slf4j.LoggerFactory; public class ShowTimeseriesDataSet extends QueryDataSet { private static final Logger logger = LoggerFactory.getLogger(ShowTimeseriesDataSet.class); - private final ShowTimeSeriesPlan plan; private List result = new ArrayList<>(); private int index = 0; private QueryContext context; + private List timeseriesList; + private boolean hasSetRecord; public boolean hasLimit = true; - public ShowTimeseriesDataSet(List paths, List dataTypes, - ShowTimeSeriesPlan showTimeSeriesPlan, QueryContext context) { -super(new ArrayList<>(paths), dataTypes); + private static Path[] resourcePaths = {new PartialPath(COLUMN_TIMESERIES, false), + new PartialPath(COLUMN_TIMESERIES_ALIAS, false), new PartialPath(COLUMN_STORAGE_GROUP, false), + new PartialPath(COLUMN_TIMESERIES_DATATYPE, false), new
[GitHub] [incubator-iotdb] Alima777 opened a new pull request #1751: [IOTDB-902] Order by time desc aggregation bug
Alima777 opened a new pull request #1751: URL: https://github.com/apache/incubator-iotdb/pull/1751 This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [incubator-iotdb] yhwangBonc commented on a change in pull request #1749: Avoid type conversion when encoding MeasureSchema
yhwangBonc commented on a change in pull request #1749: URL: https://github.com/apache/incubator-iotdb/pull/1749#discussion_r492600924 ## File path: tsfile/src/main/java/org/apache/iotdb/tsfile/write/schema/MeasurementSchema.java ## @@ -98,12 +98,11 @@ public static MeasurementSchema deserializeFrom(InputStream inputStream) throws measurementSchema.measurementId = ReadWriteIOUtils.readString(inputStream); Review comment: OK, I'll add it This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [incubator-iotdb] yhwangBonc commented on a change in pull request #1749: Avoid type conversion when encoding MeasureSchema
yhwangBonc commented on a change in pull request #1749: URL: https://github.com/apache/incubator-iotdb/pull/1749#discussion_r492600695 ## File path: tsfile/src/main/java/org/apache/iotdb/tsfile/file/metadata/enums/TSEncoding.java ## @@ -51,6 +51,35 @@ public static TSEncoding deserialize(short i) { } } + /** + * give an byte to return a encoding type. + * + * @param i byte number + * @return encoding type + */ + public static TSEncoding byteToEnum(byte i) { +switch (i) { Review comment: Copy that. I'll change it This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [incubator-iotdb] neuyilan commented on a change in pull request #1749: Avoid type conversion when encoding MeasureSchema
neuyilan commented on a change in pull request #1749: URL: https://github.com/apache/incubator-iotdb/pull/1749#discussion_r492568246 ## File path: tsfile/src/main/java/org/apache/iotdb/tsfile/write/schema/MeasurementSchema.java ## @@ -98,12 +98,11 @@ public static MeasurementSchema deserializeFrom(InputStream inputStream) throws measurementSchema.measurementId = ReadWriteIOUtils.readString(inputStream); Review comment: Add one UT of the serialize and deserialize method ## File path: tsfile/src/main/java/org/apache/iotdb/tsfile/file/metadata/enums/TSEncoding.java ## @@ -51,6 +51,35 @@ public static TSEncoding deserialize(short i) { } } + /** + * give an byte to return a encoding type. + * + * @param i byte number + * @return encoding type + */ + public static TSEncoding byteToEnum(byte i) { +switch (i) { Review comment: better to check the size of this parameter as TSDataType This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [incubator-iotdb] yhwangBonc commented on a change in pull request #1749: Avoid type conversion when encoding MeasureSchema
yhwangBonc commented on a change in pull request #1749: URL: https://github.com/apache/incubator-iotdb/pull/1749#discussion_r492563096 ## File path: tsfile/src/main/java/org/apache/iotdb/tsfile/file/metadata/enums/CompressionType.java ## @@ -52,6 +52,35 @@ public static CompressionType deserialize(short i) { } } + /** + * give an byte to return a compression type. + * + * @param i byte number + * @return CompressionType + */ + public static CompressionType byteToEnum(byte i) { Review comment: It's my negligence. I'll change it This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [incubator-iotdb] mychaow commented on a change in pull request #1749: Avoid type conversion when encoding MeasureSchema
mychaow commented on a change in pull request #1749: URL: https://github.com/apache/incubator-iotdb/pull/1749#discussion_r492546747 ## File path: tsfile/src/main/java/org/apache/iotdb/tsfile/file/metadata/enums/CompressionType.java ## @@ -52,6 +52,35 @@ public static CompressionType deserialize(short i) { } } + /** + * give an byte to return a compression type. + * + * @param i byte number + * @return CompressionType + */ + public static CompressionType byteToEnum(byte i) { Review comment: byte i, why call this name This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [incubator-iotdb] SilverNarcissus commented on a change in pull request #1693: [IOTDB-863]: add a switch to drop ouf-of-order data that is recognized by IoTDB
SilverNarcissus commented on a change in pull request #1693: URL: https://github.com/apache/incubator-iotdb/pull/1693#discussion_r492513870 ## File path: server/src/test/java/org/apache/iotdb/db/engine/storagegroup/StorageGroupProcessorTest.java ## @@ -26,6 +26,7 @@ import java.util.Collections; Review comment: use this line to change the time partition and add some test over different time partition. ```IoTDBDescriptor.getInstance().getConfig().setPartitionInterval(100);``` do not forget to set it back to original value. You can refer to ```IoTDBMultiSeriesIT.java``` for this. Thank you very much XD This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [incubator-iotdb] MingzheLiu1998 opened a new pull request #1750: [Sonar] Fix Codesmell blocker and critical issue
MingzheLiu1998 opened a new pull request #1750: URL: https://github.com/apache/incubator-iotdb/pull/1750 1. Rename variable 2. Define a constant name for repeated strings This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [incubator-iotdb] shareli closed issue #1746: 胜帮科技股份
shareli closed issue #1746: URL: https://github.com/apache/incubator-iotdb/issues/1746 This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [incubator-iotdb] yhwangBonc opened a new pull request #1749: Avoid type conversion when encoding MeasureSchema
yhwangBonc opened a new pull request #1749: URL: https://github.com/apache/incubator-iotdb/pull/1749 This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [incubator-iotdb] sonarcloud[bot] commented on pull request #1743: fix cross-tests bug
sonarcloud[bot] commented on pull request #1743: URL: https://github.com/apache/incubator-iotdb/pull/1743#issuecomment-695796411 Kudos, SonarCloud Quality Gate passed! [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1743=false=BUG) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1743=false=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1743=false=BUG) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1743=false=VULNERABILITY) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1743=false=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1743=false=VULNERABILITY) (and [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1743=false=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/i ssues?id=apache_incubator-iotdb=1743=false=SECURITY_HOTSPOT) to review) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1743=false=CODE_SMELL) [](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1743=false=CODE_SMELL) [0 Code Smells](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb=1743=false=CODE_SMELL) [](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb=1743) No Coverage information [](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb=1743=new_duplicated_lines_density=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb=1743=new_duplicated_lines_density=list) The version of Java (1.8.0_252) you have used to run this analysis is deprecated and we will stop accepting it from October 2020. Please update to at least Java 11. Read more [here](https://sonarcloud.io/documentation/upcoming/) This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org