Hi, I'd like to call the batch insertion of data2 as insertTimeAlignedBatch and call the batch insertion of data1 insertSingleDeviceRowBatch.
> > > Data 1: > > > row1: time, device1, s1, s2 > > > row2: time, device2, s3, s4 > > > > > > Data 2: > > > device1 > > > time, s1, s2, s3 > > > 1 1 2 3 > > > 2 1 2 3 > > > 3 1 2 3 Good weather! Happy every day! ?????????????????????? ------------------ ???????? ------------------ ??????: "Jialin Qiao"<[email protected]>; ????????: 2020??4??18??(??????) ????4:12 ??????: "dev"<[email protected]>; ????: Re: [Discuss] Method names in Session Hi, There are mainly four interfaces in Session. (1) insert(String deviceId, long time, List<String> measurements, List<String> values) insert some measurements of a device at a timestamp (2) insertInBatch(List<String> deviceIds, List<Long> times, List<List<String>> measurementsList, List<List<String>> valuesList) multiple independent "insert" (3) insertBatch(RowBatch rowBatch) insert some data of one device (4) insertMultipleDeviceBatch(Map<String, RowBatch> rowBatchMap) multiple independent "insertBatch" > InsertDevice() > InsertMutiDevice() or InsertBatch() Could you tell the relationship between these two naming with the existing four? Thanks, ?????????????????????????????????? Jialin Qiao School of Software, Tsinghua University ?????? ???????? ???????? Dawei Liu <[email protected]> ??2020??4??18?????? ????3:58?????? > hi, > I don??t like AlignXX , the device and signal items should be intuitively > considered in the user's mind > > > So I think the method name should be: > InsertDevice() > InsertMutiDevice() or InsertBatch() > > > Thanks > ?????? > Dawei Liu > On 04/18/2020 15:24, Xiangdong Huang wrote: > Hi, > > > Then, RowBatch is renamed to AlignedColumns? > > A little better than SeriesBatch and ColumnBatch. > > Best, > ----------------------------------- > Xiangdong Huang > School of Software, Tsinghua University > > ?????? > ???????? ???????? > > > Jialin Qiao <[email protected]> ??2020??4??18?????? ????3:13?????? > > > Hi, > > > > insertAlignedColumns is fine to me. > > > > Then, RowBatch is renamed to AlignedColumns? > > > > Thanks, > > ?????????????????????????????????? > > Jialin Qiao > > School of Software, Tsinghua University > > > > ?????? > > ???????? ???????? > > > > > > Xiangdong Huang <[email protected]> ??2020??4??18?????? ????3:09?????? > > > > > Hi, > > > > > > If you call the batch insertion of Data 1 as insertRows(), > > > why not call the batch insertion of Data 2 as insertColumns()? or, > > > insertAlignedColumns(); > > > > > > > RowBatch -> SeriesBatch or ColumnBatch > > > > > > I think the name is not clear. Is there better suggestion? > > > > > > Data 1: > > > row1: time, device1, s1, s2 > > > row2: time, device2, s3, s4 > > > > > > Data 2: > > > device1 > > > time, s1, s2, s3 > > > 1 1 2 3 > > > 2 1 2 3 > > > 3 1 2 3 > > > > > > Best, > > > ----------------------------------- > > > Xiangdong Huang > > > School of Software, Tsinghua University > > > > > > ?????? > > > ???????? ???????? > > > > > > > > > Haonan Hou <[email protected]> ??2020??4??18?????? ????1:39?????? > > > > > > > Hi, > > > > > > > > +1. The new way of naming seems more straight forward. > > > > > > > > Thanks, > > > > Haonan > > > > > > > > > > > > > On Apr 18, 2020, at 1:29 PM, Jialin Qiao <[email protected]> > > > wrote: > > > > > > > > > > Hi, > > > > > > > > > > The native API Session provides many methods. However, their names > > are > > > > > confusing. For example, insertBatch and insertInBatch. > > > > > > > > > > (1) insertBatch actually receives a RowBatch structure, which > > contains > > > > data > > > > > of multiple measurements of a device, these measurements data share > > the > > > > > same time column. > > > > > > > > > > If we treat it as a table, the table name is deviceId, the columns > > are > > > > > Timestamp, measurements name. This table should not contain null > > > value. > > > > > > > > > > For example > > > > > device1 > > > > > time, s1, s2, s3 > > > > > 1 1 2 3 > > > > > 2 1 2 3 > > > > > 3 1 2 3 > > > > > > > > > > (2) insertInBatch insert multiple rows, each row contains a > > timestamp, > > > a > > > > > deviceID and arbitrary measurements with values. Each row is > > > independent. > > > > > > > > > > For example, > > > > > row1: time, device1, s1, s2 > > > > > row2: time, device2, s3, s4 > > > > > > > > > > So I plan to rename these methods. > > > > > > > > > > RowBatch -> SeriesBatch or ColumnBatch > > > > > insertBatch -> insertSeriesBatch or ColumnBatch > > > > > insertInBatch -> insertRows > > > > > > > > > > Does this look good to you? > > > > > > > > > > Thanks, > > > > > ?????????????????????????????????? > > > > > Jialin Qiao > > > > > School of Software, Tsinghua University > > > > > > > > > > ?????? > > > > > ???????? ???????? > > > > > > > > > > > > > >
