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&nbsp;&nbsp;the batch insertion of data2 as
> insertTimeAlignedBatch and call the batch insertion of data1
> insertSingleDeviceRowBatch.
> >
> >
> >&gt; &gt; &gt; Data 1:
> >&gt; &gt; &gt; row1: time, device1, s1, s2
> >&gt; &gt; &gt; row2: time, device2, s3, s4
> >&gt; &gt; &gt;
> >&gt; &gt; &gt; Data 2:
> >&gt; &gt; &gt; device1
> >&gt; &gt; &gt; time, s1, s2, s3
> >&gt; &gt; &gt; 1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
> 1&nbsp;&nbsp;&nbsp;&nbsp; 2&nbsp;&nbsp;&nbsp; 3
> >&gt; &gt; &gt; 2&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
> 1&nbsp;&nbsp;&nbsp;&nbsp; 2&nbsp;&nbsp;&nbsp; 3
> >&gt; &gt; &gt; 3&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
> 1&nbsp;&nbsp;&nbsp;&nbsp; 2&nbsp;&nbsp;&nbsp; 3
> >
> >Good weather! Happy every day!
> >天气不错,祝开开心心!
> >
> >&nbsp;
> >
> >
> >
> >
> >------------------&nbsp;原始邮件&nbsp;------------------
> >发件人:&nbsp;"Jialin Qiao"<[email protected]&gt;;
> >发送时间:&nbsp;2020年4月18日(星期六) 下午4:12
> >收件人:&nbsp;"dev"<[email protected]&gt;;
> >
> >主题:&nbsp;Re: [Discuss] Method names in Session
> >
> >
> >
> >Hi,
> >
> >There are mainly four interfaces in Session.
> >
> >(1) insert(String deviceId, long time, List<String&gt; measurements,
> >List<String&gt; values)
> >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; insert some measurements of a device at a
> timestamp
> >(2) insertInBatch(List<String&gt; deviceIds, List<Long&gt; times,
> >List<List<String&gt;&gt; measurementsList, List<List<String&gt;&gt;
> valuesList)
> >&nbsp;&nbsp;&nbsp;&nbsp; multiple independent "insert"
> >(3) insertBatch(RowBatch rowBatch)
> >&nbsp;&nbsp;&nbsp;&nbsp; insert some data of one device
> >(4) insertMultipleDeviceBatch(Map<String, RowBatch&gt; rowBatchMap)
> >&nbsp;&nbsp;&nbsp;&nbsp; multiple independent "insertBatch"
> >
> >
> >&gt; InsertDevice()
> >&gt; 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]&gt; 于2020年4月18日周六 下午3:58写道:
> >
> >&gt; hi,
> >&gt; I don’t like AlignXX , the device and signal items should be
> intuitively
> >&gt; considered in the user's mind
> >&gt;
> >&gt;
> >&gt; So I think the method name should be:
> >&gt; InsertDevice()
> >&gt; InsertMutiDevice() or InsertBatch()
> >&gt;
> >&gt;
> >&gt; Thanks
> >&gt; ———
> >&gt; Dawei Liu
> >&gt; On 04/18/2020 15:24, Xiangdong Huang wrote:
> >&gt; Hi,
> >&gt;
> >&gt; &gt; Then, RowBatch is renamed to AlignedColumns?
> >&gt;
> >&gt; A little better than SeriesBatch and ColumnBatch.
> >&gt;
> >&gt; Best,
> >&gt; -----------------------------------
> >&gt; Xiangdong Huang
> >&gt; School of Software, Tsinghua University
> >&gt;
> >&gt; 黄向东
> >&gt; 清华大学 软件学院
> >&gt;
> >&gt;
> >&gt; Jialin Qiao <[email protected]&gt; 于2020年4月18日周六 下午3:13写道:
> >&gt;
> >&gt; &gt; Hi,
> >&gt; &gt;
> >&gt; &gt; insertAlignedColumns is fine to me.
> >&gt; &gt;
> >&gt; &gt; Then, RowBatch is renamed to AlignedColumns?
> >&gt; &gt;
> >&gt; &gt; Thanks,
> >&gt; &gt; —————————————————
> >&gt; &gt; Jialin Qiao
> >&gt; &gt; School of Software, Tsinghua University
> >&gt; &gt;
> >&gt; &gt; 乔嘉林
> >&gt; &gt; 清华大学 软件学院
> >&gt; &gt;
> >&gt; &gt;
> >&gt; &gt; Xiangdong Huang <[email protected]&gt; 于2020年4月18日周六 下午3:09写道:
> >&gt; &gt;
> >&gt; &gt; &gt; Hi,
> >&gt; &gt; &gt;
> >&gt; &gt; &gt; If you call the batch insertion of Data 1 as insertRows(),
> >&gt; &gt; &gt; why not call the batch insertion of Data 2 as&nbsp;
> insertColumns()? or,
> >&gt; &gt; &gt; insertAlignedColumns();
> >&gt; &gt; &gt;
> >&gt; &gt; &gt; &gt; RowBatch -&gt; SeriesBatch or ColumnBatch
> >&gt; &gt; &gt;
> >&gt; &gt; &gt; I think the name is not clear. Is there better suggestion?
> >&gt; &gt; &gt;
> >&gt; &gt; &gt; Data 1:
> >&gt; &gt; &gt; row1: time, device1, s1, s2
> >&gt; &gt; &gt; row2: time, device2, s3, s4
> >&gt; &gt; &gt;
> >&gt; &gt; &gt; Data 2:
> >&gt; &gt; &gt; device1
> >&gt; &gt; &gt; time, s1, s2, s3
> >&gt; &gt; &gt; 1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
> 1&nbsp;&nbsp;&nbsp;&nbsp; 2&nbsp;&nbsp;&nbsp; 3
> >&gt; &gt; &gt; 2&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
> 1&nbsp;&nbsp;&nbsp;&nbsp; 2&nbsp;&nbsp;&nbsp; 3
> >&gt; &gt; &gt; 3&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
> 1&nbsp;&nbsp;&nbsp;&nbsp; 2&nbsp;&nbsp;&nbsp; 3
> >&gt; &gt; &gt;
> >&gt; &gt; &gt; Best,
> >&gt; &gt; &gt; -----------------------------------
> >&gt; &gt; &gt; Xiangdong Huang
> >&gt; &gt; &gt; School of Software, Tsinghua University
> >&gt; &gt; &gt;
> >&gt; &gt; &gt;&nbsp; 黄向东
> >&gt; &gt; &gt; 清华大学 软件学院
> >&gt; &gt; &gt;
> >&gt; &gt; &gt;
> >&gt; &gt; &gt; Haonan Hou <[email protected]&gt; 于2020年4月18日周六
> 下午1:39写道:
> >&gt; &gt; &gt;
> >&gt; &gt; &gt; &gt; Hi,
> >&gt; &gt; &gt; &gt;
> >&gt; &gt; &gt; &gt; +1. The new way of naming seems more straight forward.
> >&gt; &gt; &gt; &gt;
> >&gt; &gt; &gt; &gt; Thanks,
> >&gt; &gt; &gt; &gt; Haonan
> >&gt; &gt; &gt; &gt;
> >&gt; &gt; &gt; &gt;
> >&gt; &gt; &gt; &gt; &gt; On Apr 18, 2020, at 1:29 PM, Jialin Qiao <
> [email protected]&gt;
> >&gt; &gt; &gt; wrote:
> >&gt; &gt; &gt; &gt; &gt;
> >&gt; &gt; &gt; &gt; &gt; Hi,
> >&gt; &gt; &gt; &gt; &gt;
> >&gt; &gt; &gt; &gt; &gt; The native API Session provides many methods.
> However, their names
> >&gt; &gt; are
> >&gt; &gt; &gt; &gt; &gt; confusing. For example, insertBatch and
> insertInBatch.
> >&gt; &gt; &gt; &gt; &gt;
> >&gt; &gt; &gt; &gt; &gt; (1) insertBatch actually receives a RowBatch
> structure, which
> >&gt; &gt; contains
> >&gt; &gt; &gt; &gt; data
> >&gt; &gt; &gt; &gt; &gt; of multiple measurements of a device, these
> measurements data share
> >&gt; &gt; the
> >&gt; &gt; &gt; &gt; &gt; same time column.
> >&gt; &gt; &gt; &gt; &gt;
> >&gt; &gt; &gt; &gt; &gt; If we treat it as a table, the table name is
> deviceId, the columns
> >&gt; &gt; are
> >&gt; &gt; &gt; &gt; &gt; Timestamp, measurements name.&nbsp; This table
> should not contain null
> >&gt; &gt; &gt; value.
> >&gt; &gt; &gt; &gt; &gt;
> >&gt; &gt; &gt; &gt; &gt; For example
> >&gt; &gt; &gt; &gt; &gt; device1
> >&gt; &gt; &gt; &gt; &gt; time, s1, s2, s3
> >&gt; &gt; &gt; &gt; &gt; 1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
> 1&nbsp;&nbsp;&nbsp;&nbsp; 2&nbsp;&nbsp;&nbsp; 3
> >&gt; &gt; &gt; &gt; &gt; 2&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
> 1&nbsp;&nbsp;&nbsp;&nbsp; 2&nbsp;&nbsp;&nbsp; 3
> >&gt; &gt; &gt; &gt; &gt; 3&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
> 1&nbsp;&nbsp;&nbsp;&nbsp; 2&nbsp;&nbsp;&nbsp; 3
> >&gt; &gt; &gt; &gt; &gt;
> >&gt; &gt; &gt; &gt; &gt; (2) insertInBatch insert multiple rows, each row
> contains a
> >&gt; &gt; timestamp,
> >&gt; &gt; &gt; a
> >&gt; &gt; &gt; &gt; &gt; deviceID and arbitrary measurements with values.
> Each row is
> >&gt; &gt; &gt; independent.
> >&gt; &gt; &gt; &gt; &gt;
> >&gt; &gt; &gt; &gt; &gt; For example,
> >&gt; &gt; &gt; &gt; &gt; row1: time, device1, s1, s2
> >&gt; &gt; &gt; &gt; &gt; row2: time, device2, s3, s4
> >&gt; &gt; &gt; &gt; &gt;
> >&gt; &gt; &gt; &gt; &gt; So I plan to rename these methods.
> >&gt; &gt; &gt; &gt; &gt;
> >&gt; &gt; &gt; &gt; &gt; RowBatch -&gt; SeriesBatch or ColumnBatch
> >&gt; &gt; &gt; &gt; &gt; insertBatch -&gt; insertSeriesBatch or
> ColumnBatch
> >&gt; &gt; &gt; &gt; &gt; insertInBatch -&gt; insertRows
> >&gt; &gt; &gt; &gt; &gt;
> >&gt; &gt; &gt; &gt; &gt; Does this look good to you?
> >&gt; &gt; &gt; &gt; &gt;
> >&gt; &gt; &gt; &gt; &gt; Thanks,
> >&gt; &gt; &gt; &gt; &gt; —————————————————
> >&gt; &gt; &gt; &gt; &gt; Jialin Qiao
> >&gt; &gt; &gt; &gt; &gt; School of Software, Tsinghua University
> >&gt; &gt; &gt; &gt; &gt;
> >&gt; &gt; &gt; &gt; &gt; 乔嘉林
> >&gt; &gt; &gt; &gt; &gt; 清华大学 软件学院
> >&gt; &gt; &gt; &gt;
> >&gt; &gt; &gt; &gt;
> >&gt; &gt; &gt;
> >&gt; &gt;
> >&gt;
>

Reply via email to