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 2020/10/06 08:44:13 UTC

[GitHub] [iotdb] jack870131 commented on a change in pull request #1791: [IOTDB-912] Implement wasNull method in AbstractIoTDBJDBCResultSet

jack870131 commented on a change in pull request #1791:
URL: https://github.com/apache/iotdb/pull/1791#discussion_r500106698



##########
File path: service-rpc/src/main/java/org/apache/iotdb/rpc/IoTDBRpcDataSet.java
##########
@@ -312,9 +317,23 @@ public float getFloat(String columnName) throws StatementExecutionException {
     checkRecord();
     int index = columnOrdinalMap.get(columnName) - START_INDEX;
     if (!isNull(index, rowsIndex - 1)) {
+      lastReadWasNull = false;
       return BytesUtils.bytesToFloat(values[index]);
     } else {
-      throw new StatementExecutionException(String.format(VALUE_IS_NULL, columnName));
+      lastReadWasNull = true;
+      return 0;
+    }
+  }
+
+  public short getShort(String columnName) throws StatementExecutionException {
+    checkRecord();

Review comment:
       I think so, too. I felt weird that why it was implemented. How about just throwing exception while it has been used?




----------------------------------------------------------------
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