You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@iotdb.apache.org by "qian (Jira)" <ji...@apache.org> on 2021/11/13 07:55:00 UTC

[jira] [Created] (IOTDB-2004) The initial assignment of long or Long can't use lowercase l

qian created IOTDB-2004:
---------------------------

             Summary: The initial assignment of long or Long can't use lowercase l
                 Key: IOTDB-2004
                 URL: https://issues.apache.org/jira/browse/IOTDB-2004
             Project: Apache IoTDB
          Issue Type: Improvement
            Reporter: qian
             Fix For: master branch


In the initial assignment of long or Long, uppercase L must be used instead of lowercase l. Lowercase is easy to confuse with the number 1 and cause misunderstandings.
{code:java}
//代码占位符
private void cast(long time, long value, PointCollector collector)
    throws IOException, QueryProcessException {
  switch (targetDataType) {
    case INT32:
      collector.putInt(time, (int) value);
      return;
    case INT64:
      collector.putLong(time, value);
      return;
    case FLOAT:
      collector.putFloat(time, value);
      return;
    case DOUBLE:
      collector.putDouble(time, value);
      return;
    case BOOLEAN:
      collector.putBoolean(time, value != 0l);
      return;
    case TEXT:
      collector.putString(time, String.valueOf(value));
      return;
    default:
      throw new UnsupportedOperationException();
  }
} {code}



--
This message was sent by Atlassian Jira
(v8.20.1#820001)