[GitHub] [iotdb-client-go] Eugene-Song opened a new pull request #21: Update README.md

2021-05-27 Thread GitBox


Eugene-Song opened a new pull request #21:
URL: https://github.com/apache/iotdb-client-go/pull/21


   Update some pages of README.md


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




[jira] [Commented] (IOTDB-1274) ./sbin/start-cli.sh -e 'select last * from root.*' Parser error : Msg: 401

2021-05-27 Thread Jira


[ 
https://issues.apache.org/jira/browse/IOTDB-1274?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17352364#comment-17352364
 ] 

刘珍 commented on IOTDB-1274:
---

 ./sbin/start-cli.sh -p 6677 -e 'select last* from root'

*和前面的单词连着。可以执行。


> ./sbin/start-cli.sh -e 'select last * from root.*'  Parser error  : Msg: 401
> 
>
> Key: IOTDB-1274
> URL: https://issues.apache.org/jira/browse/IOTDB-1274
> Project: Apache IoTDB
>  Issue Type: Bug
>  Components: Client/CLI
>Reporter: 刘珍
>Priority: Minor
>
> 0.11.3  9e371454b05f9a0e24fabb2c84f7ce690f14a882
> {color:#FF}start-cli.sh -e   SQL contains *   parser error{color}
> {color:#FF}Msg: 401: line 1:18 mismatched input 'conf' expecting \{FROM, 
> ',', '.'}{color}
>  
> set storage group root.db1;
> CREATE TIMESERIES root.db1.tab1.id WITH DATATYPE=INT32, ENCODING=PLAIN
> CREATE TIMESERIES root.db1.tab1.name WITH DATATYPE=text, ENCODING=PLAIN
> CREATE TIMESERIES root.db1.tab1.age WITH DATATYPE=INT32, ENCODING=PLAIN
> CREATE TIMESERIES root.db1.tab1.country WITH DATATYPE=text, ENCODING=PLAIN
> CREATE TIMESERIES root.db1.tab1.salary WITH DATATYPE=float, ENCODING=PLAIN
> CREATE TIMESERIES root.db1.tab1.other WITH DATATYPE=double, ENCODING=PLAIN
> CREATE TIMESERIES root.db1.tab1.student WITH DATATYPE=boolean, ENCODING=PLAIN
>  
> insert into root.db1.tab1(time,id,name,age,country,salary,other ,student ) 
> values(now(),1,'lily',25,'usa',5678.34,7.77,false);
> insert into root.db1.tab1(time,id,name,age,country,salary,other ,student ) 
> values(now(),2,'lily2',25,'usa',5678.34,7.77,false);
>  
> ./sbin/start-cli.sh{color:#FF} -e{color} 'select last * from root.*'
> Msg: 401: line 1:18 mismatched input 'conf' expecting \{FROM, ',', '.'}
>  
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Created] (IOTDB-1401) Tablet's rowsize = 0 ,insertTablets throws an exception ,gives an unfriendly error message

2021-05-27 Thread Jira
刘珍 created IOTDB-1401:
-

 Summary: Tablet's rowsize = 0 ,insertTablets throws an exception 
,gives an unfriendly error message
 Key: IOTDB-1401
 URL: https://issues.apache.org/jira/browse/IOTDB-1401
 Project: Apache IoTDB
  Issue Type: Bug
  Components: Server
Affects Versions: 0.12.0
Reporter: 刘珍
 Attachments: image-2021-05-27-16-05-45-882.png

[rel/0.12]  05/18  99822c7feb7797f33b0e740b0f3ea38803d11d17

iotdb log :
 !image-2021-05-27-16-05-45-882.png|thumbnail! 
org.apache.iotdb.db.exception.BatchProcessException: {color:red}*Batch process 
failed:[]*{color}
at 
org.apache.iotdb.db.engine.storagegroup.StorageGroupProcessor.insertTablet(StorageGroupProcessor.java:858)


test case:
import org.apache.iotdb.rpc.IoTDBConnectionException;
import org.apache.iotdb.rpc.StatementExecutionException;
import org.apache.iotdb.rpc.TSStatusCode;
import org.apache.iotdb.session.Session;
import org.apache.iotdb.session.SessionDataSet;
import org.apache.iotdb.session.SessionDataSet.DataIterator;
import org.apache.iotdb.tsfile.file.metadata.enums.CompressionType;
import org.apache.iotdb.tsfile.file.metadata.enums.TSDataType;
import org.apache.iotdb.tsfile.file.metadata.enums.TSEncoding;
import org.apache.iotdb.tsfile.write.record.Tablet;
import org.apache.iotdb.tsfile.write.schema.MeasurementSchema;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Random;

@SuppressWarnings("squid:S106")
public class SessionExample {

  private static Session session;
  private static Session sessionEnableRedirect;
  private static final String ROOT_SG1_D1_S1 = "root.sg1.d1.s1";
  private static final String ROOT_SG1_D1_S2 = "root.sg1.d1.s2";
  private static final String ROOT_SG1_D1_S3 = "root.sg1.d1.s3";
  private static final String ROOT_SG1_D1_S4 = "root.sg1.d1.s4";
  private static final String ROOT_SG1_D1_S5 = "root.sg1.d1.s5";
  private static final String ROOT_SG1_D1 = "root.sg1.d1";
  private static final String LOCAL_HOST = "127.0.0.1";

  public static void main(String[] args)
  throws IoTDBConnectionException, StatementExecutionException {
session = new Session(LOCAL_HOST, 6667, "root", "root");
session.open(false);

// set session fetchSize
session.setFetchSize(1);

try {
  session.setStorageGroup("root.sg1");
} catch (StatementExecutionException e) {
  if (e.getStatusCode() != 
TSStatusCode.PATH_ALREADY_EXIST_ERROR.getStatusCode()) {
throw e;
  }
}

createTimeseries();
createMultiTimeseries();
insertTablets();

session.close();
  }

  private static void createTimeseries()
  throws IoTDBConnectionException, StatementExecutionException {

if (!session.checkTimeseriesExists(ROOT_SG1_D1_S1)) {
  session.createTimeseries(
  ROOT_SG1_D1_S1, TSDataType.INT64, TSEncoding.RLE, 
CompressionType.SNAPPY);
}
if (!session.checkTimeseriesExists(ROOT_SG1_D1_S2)) {
  session.createTimeseries(
  ROOT_SG1_D1_S2, TSDataType.INT64, TSEncoding.RLE, 
CompressionType.SNAPPY);
}
if (!session.checkTimeseriesExists(ROOT_SG1_D1_S3)) {
  session.createTimeseries(
  ROOT_SG1_D1_S3, TSDataType.INT64, TSEncoding.RLE, 
CompressionType.SNAPPY);
}

// create timeseries with tags and attributes
if (!session.checkTimeseriesExists(ROOT_SG1_D1_S4)) {
  Map tags = new HashMap<>();
  tags.put("tag1", "v1");
  Map attributes = new HashMap<>();
  tags.put("description", "v1");
  session.createTimeseries(
  ROOT_SG1_D1_S4,
  TSDataType.INT64,
  TSEncoding.RLE,
  CompressionType.SNAPPY,
  null,
  tags,
  attributes,
  "temperature");
}

// create timeseries with SDT property, SDT will take place when flushing
if (!session.checkTimeseriesExists(ROOT_SG1_D1_S5)) {
  // COMPDEV is required
  // COMPMAXTIME and COMPMINTIME are optional and their unit is ms
  Map props = new HashMap<>();
  props.put("LOSS", "sdt");
  props.put("COMPDEV", "0.01");
  props.put("COMPMINTIME", "2");
  props.put("COMPMAXTIME", "10");
  session.createTimeseries(
  ROOT_SG1_D1_S5,
  TSDataType.INT64,
  TSEncoding.RLE,
  CompressionType.SNAPPY,
  props,
  null,
  null,
  null);
}
  }

  private static void createMultiTimeseries()
  throws IoTDBConnectionException, StatementExecutionException {

if (!session.checkTimeseriesExists("root.sg1.d2.s1")
&& !session.checkTimeseriesExists("root.sg1.d2.s2")) {
  List paths = new ArrayList<>();
  paths.add("root.sg1.d2.s1");
  paths.add("root.sg1.d2.s2");
  List tsDataTypes = new ArrayList<>();
  tsDataTypes.add(TSDataType.INT64);
  tsDataTypes.add(TSDataType.INT64);
  List tsEncodings = 

[jira] [Created] (IOTDB-1400) Support Arithmetic Operations in SELECT Clauses

2021-05-27 Thread Steve Yurong Su (Jira)
Steve Yurong Su created IOTDB-1400:
--

 Summary: Support Arithmetic Operations in SELECT Clauses
 Key: IOTDB-1400
 URL: https://issues.apache.org/jira/browse/IOTDB-1400
 Project: Apache IoTDB
  Issue Type: Sub-task
Reporter: Steve Yurong Su


select a + b, a - b, a * b, a / b, a % b from root.sg.d;



--
This message was sent by Atlassian Jira
(v8.3.4#803005)