You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@iotdb.apache.org by GitBox <gi...@apache.org> on 2021/03/23 08:10:26 UTC

[GitHub] [iotdb] HTHou opened a new pull request #2888: [IOTDB-1253] [To Vector] Support null value in aligned time series

HTHou opened a new pull request #2888:
URL: https://github.com/apache/iotdb/pull/2888


   We need to consider the nullable aligned timeseries data. 
   
   Some subtasks shows as below:
   
   - [ ] Use the bitmaps to indicate the null-value position in the tablet on the client side
   - [ ] Serialize and send the nullable tablet to server size
   - [ ] Use the bitmaps in VectorTVList to show the null values
   - [ ] Support nullable aligned timeseries value in TsFile 
   


-- 
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:
users@infra.apache.org



[GitHub] [iotdb] SilverNarcissus commented on a change in pull request #2888: [IOTDB-1253] [To Vector] Support null value in aligned time series

Posted by GitBox <gi...@apache.org>.
SilverNarcissus commented on a change in pull request #2888:
URL: https://github.com/apache/iotdb/pull/2888#discussion_r607774840



##########
File path: session/src/main/java/org/apache/iotdb/session/Session.java
##########
@@ -1453,6 +1453,10 @@ private int calculateLength(List<TSDataType> types, List<Object> values)
   private void putValues(List<TSDataType> types, List<Object> values, ByteBuffer buffer)
       throws IoTDBConnectionException {
     for (int i = 0; i < values.size(); i++) {
+      if (values.get(i) == null) {
+        ReadWriteIOUtils.write((byte) -2, buffer);

Review comment:
       Maybe this "-2" can be a constant with a understandable name.

##########
File path: server/src/main/java/org/apache/iotdb/db/utils/TypeInferenceUtils.java
##########
@@ -81,6 +81,8 @@ public static TSDataType getPredictedDataType(Object value, boolean inferType) {
           return floatingStringInferType;
         }
         // "NaN" is returned if the NaN Literal is given in Parser
+      } else if ("null".equals(strValue)) {

Review comment:
       What if user pass a "NULL" as value? Should we think "NULL" also a null?




-- 
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:
users@infra.apache.org



[GitHub] [iotdb] HTHou merged pull request #2888: [IOTDB-1253] [To Vector] Support null value in aligned time series

Posted by GitBox <gi...@apache.org>.
HTHou merged pull request #2888:
URL: https://github.com/apache/iotdb/pull/2888


   


-- 
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:
users@infra.apache.org



[GitHub] [iotdb] HTHou commented on a change in pull request #2888: [IOTDB-1253] [To Vector] Support null value in aligned time series

Posted by GitBox <gi...@apache.org>.
HTHou commented on a change in pull request #2888:
URL: https://github.com/apache/iotdb/pull/2888#discussion_r608268031



##########
File path: session/src/main/java/org/apache/iotdb/session/Session.java
##########
@@ -1453,6 +1453,10 @@ private int calculateLength(List<TSDataType> types, List<Object> values)
   private void putValues(List<TSDataType> types, List<Object> values, ByteBuffer buffer)
       throws IoTDBConnectionException {
     for (int i = 0; i < values.size(); i++) {
+      if (values.get(i) == null) {
+        ReadWriteIOUtils.write((byte) -2, buffer);

Review comment:
       Sure




-- 
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:
users@infra.apache.org



[GitHub] [iotdb] HTHou commented on a change in pull request #2888: [IOTDB-1253] [To Vector] Support null value in aligned time series

Posted by GitBox <gi...@apache.org>.
HTHou commented on a change in pull request #2888:
URL: https://github.com/apache/iotdb/pull/2888#discussion_r608270485



##########
File path: server/src/main/java/org/apache/iotdb/db/utils/TypeInferenceUtils.java
##########
@@ -81,6 +81,8 @@ public static TSDataType getPredictedDataType(Object value, boolean inferType) {
           return floatingStringInferType;
         }
         // "NaN" is returned if the NaN Literal is given in Parser
+      } else if ("null".equals(strValue)) {

Review comment:
       I'm going to let antlr transfer `NULL` to `null`. 
   But this strValue may also come from session client by insertStringRecord, right? Yes, I think consider `NULL` here is necessary.




-- 
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:
users@infra.apache.org



[GitHub] [iotdb] HTHou commented on pull request #2888: [IOTDB-1253] [To Vector] Support null value in aligned time series

Posted by GitBox <gi...@apache.org>.
HTHou commented on pull request #2888:
URL: https://github.com/apache/iotdb/pull/2888#issuecomment-810919201


   <img width="662" alt="Screen Shot 2021-03-31 at 5 23 53 PM" src="https://user-images.githubusercontent.com/25913899/113122425-30431200-9246-11eb-9661-44de8b65af8e.png">
   


-- 
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:
users@infra.apache.org