Hi Wei Shao, > If we rename RowBatch to AlignedColumns
If the name is confusing, why not change the name? Best, ----------------------------------- Xiangdong Huang School of Software, Tsinghua University 黄向东 清华大学 软件学院 Wei Shao <[email protected]> 于2020年4月18日周六 下午6:51写道: > Hi, > > > Here is my idea for your reference: > (1) InsertBatch() can be renamed with its parameter, that is > InsertRowBatch() when accepting a RowBatch. If we rename RowBatch to > AlignedColumns, then InsertAlignedColumns() is fine. > (2) For insertInBatch(), It looks to me that this method is designed to be > the batch-insert version of insert(). So it would be better to build some > connections between these two methods' names. Perhaps we could consider > changing insertInBatch() to insertBatch() or BatchInsert(). > > > Thanks, > Wei > > > > > > > > > At 2020-04-18 16:24:57, "追忆-寻梦-呓" <[email protected]> wrote: > >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 > >> > > > > > >> > > > > 乔嘉林 > >> > > > > 清华大学 软件学院 > >> > > > > >> > > > > >> > > > >> > > >> >
