You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@iotdb.apache.org by Xiangwei Wei <wx...@gmail.com> on 2023/02/06 06:35:02 UTC

About naming of VerticallyConcatOperator

VerticallyConcatOperator is used to horizontally concatenate TsBlocks with
the same timestamp column. For example,
TsBlock A is:
| Time | ColumnA |
|    1    |     1.0    |
TsBlock B is:
| Time | ColumnB |
|    1    |       2.0    |
After the VerticallyConcatOperator, the result will be:
| Time | ColumnA | ColumnB |
|    1    |       1.0    |     2.0      |

Literally, I think it's a horizontal concatenation. So I suggest rename it
as HorizontallyConcatOperator.

However, I asked the author about the reason for this name. He said, "From
the view of a table, adding columns means vertical changes."

What's your opinion?

+1 for Plan A: Rename it as HorizontallyConcatOperator.
+1 for Plan B: Keep current name VerticallyConcatOperator.

-- 
Best,
Xiangwei Wei

Re: About naming of VerticallyConcatOperator

Posted by Guanfei Guo <gu...@qq.com.INVALID>.
+1 for Plan A.



Thanks.
Guanfei Guo
 
From: ycy wi
Date: 2023-02-06 15:13
To: dev
Subject: Re: About naming of VerticallyConcatOperator
+1 for Plan A. "Vertically" and "Horizontally" are adverbs. I think it's
easier to understand from a straightforward perspective.
 
Xiangwei Wei <wx...@gmail.com> 于2023年2月6日周一 14:35写道:
 
> VerticallyConcatOperator is used to horizontally concatenate TsBlocks with
> the same timestamp column. For example,
> TsBlock A is:
> | Time | ColumnA |
> |    1    |     1.0    |
> TsBlock B is:
> | Time | ColumnB |
> |    1    |       2.0    |
> After the VerticallyConcatOperator, the result will be:
> | Time | ColumnA | ColumnB |
> |    1    |       1.0    |     2.0      |
>
> Literally, I think it's a horizontal concatenation. So I suggest rename it
> as HorizontallyConcatOperator.
>
> However, I asked the author about the reason for this name. He said, "From
> the view of a table, adding columns means vertical changes."
>
> What's your opinion?
>
> +1 for Plan A: Rename it as HorizontallyConcatOperator.
> +1 for Plan B: Keep current name VerticallyConcatOperator.
>
> --
> Best,
> Xiangwei Wei
>

Re: About naming of VerticallyConcatOperator

Posted by ycy wi <yc...@gmail.com>.
+1 for Plan A. "Vertically" and "Horizontally" are adverbs. I think it's
easier to understand from a straightforward perspective.

Xiangwei Wei <wx...@gmail.com> 于2023年2月6日周一 14:35写道:

> VerticallyConcatOperator is used to horizontally concatenate TsBlocks with
> the same timestamp column. For example,
> TsBlock A is:
> | Time | ColumnA |
> |    1    |     1.0    |
> TsBlock B is:
> | Time | ColumnB |
> |    1    |       2.0    |
> After the VerticallyConcatOperator, the result will be:
> | Time | ColumnA | ColumnB |
> |    1    |       1.0    |     2.0      |
>
> Literally, I think it's a horizontal concatenation. So I suggest rename it
> as HorizontallyConcatOperator.
>
> However, I asked the author about the reason for this name. He said, "From
> the view of a table, adding columns means vertical changes."
>
> What's your opinion?
>
> +1 for Plan A: Rename it as HorizontallyConcatOperator.
> +1 for Plan B: Keep current name VerticallyConcatOperator.
>
> --
> Best,
> Xiangwei Wei
>

Re: About naming of VerticallyConcatOperator

Posted by 18...@163.com.
We name this as 'VerticallyConcat' before because its logic is opposite of 'vertical table’.
But the thing we forgot is that the target of two operations are different:
1. Vertical table: the target of operation is the table needed to split
2. The discussing operator: the target of operation are the TsBlocks needed to concat 

In the view of target, I think this operator should named to ‘HorizontallyConcatOperator’, PlanA.

———
Best, Weihao Li

> 2023年2月6日 14:35,Xiangwei Wei <wx...@gmail.com> 写道:
> 
> VerticallyConcatOperator is used to horizontally concatenate TsBlocks with
> the same timestamp column. For example,
> TsBlock A is:
> | Time | ColumnA |
> |    1    |     1.0    |
> TsBlock B is:
> | Time | ColumnB |
> |    1    |       2.0    |
> After the VerticallyConcatOperator, the result will be:
> | Time | ColumnA | ColumnB |
> |    1    |       1.0    |     2.0      |
> 
> Literally, I think it's a horizontal concatenation. So I suggest rename it
> as HorizontallyConcatOperator.
> 
> However, I asked the author about the reason for this name. He said, "From
> the view of a table, adding columns means vertical changes."
> 
> What's your opinion?
> 
> +1 for Plan A: Rename it as HorizontallyConcatOperator.
> +1 for Plan B: Keep current name VerticallyConcatOperator.
> 
> -- 
> Best,
> Xiangwei Wei


Re: About naming of VerticallyConcatOperator

Posted by Xiangwei Wei <wx...@gmail.com>.
Hi, all.

I got 5 +1 for planA: Rename it as HorizontallyConcatOperator, including
the origin author. So I will rename it. Thank you.

The pr is [1].

[1] https://github.com/apache/iotdb/pull/9007

Yuan Tian <ja...@gmail.com> 于2023年2月7日周二 10:37写道:

> Fine, I change my mind, +1 for planA
>
> Best,
> ---------------------
> Yuan Tian
>
> On Mon, Feb 6, 2023 at 2:35 PM Xiangwei Wei <wx...@gmail.com> wrote:
> >
> > VerticallyConcatOperator is used to horizontally concatenate TsBlocks
> with
> > the same timestamp column. For example,
> > TsBlock A is:
> > | Time | ColumnA |
> > |    1    |     1.0    |
> > TsBlock B is:
> > | Time | ColumnB |
> > |    1    |       2.0    |
> > After the VerticallyConcatOperator, the result will be:
> > | Time | ColumnA | ColumnB |
> > |    1    |       1.0    |     2.0      |
> >
> > Literally, I think it's a horizontal concatenation. So I suggest rename
> it
> > as HorizontallyConcatOperator.
> >
> > However, I asked the author about the reason for this name. He said,
> "From
> > the view of a table, adding columns means vertical changes."
> >
> > What's your opinion?
> >
> > +1 for Plan A: Rename it as HorizontallyConcatOperator.
> > +1 for Plan B: Keep current name VerticallyConcatOperator.
> >
> > --
> > Best,
> > Xiangwei Wei
>


-- 
Best,
Xiangwei Wei

Re: About naming of VerticallyConcatOperator

Posted by Yuan Tian <ja...@gmail.com>.
Fine, I change my mind, +1 for planA

Best,
---------------------
Yuan Tian

On Mon, Feb 6, 2023 at 2:35 PM Xiangwei Wei <wx...@gmail.com> wrote:
>
> VerticallyConcatOperator is used to horizontally concatenate TsBlocks with
> the same timestamp column. For example,
> TsBlock A is:
> | Time | ColumnA |
> |    1    |     1.0    |
> TsBlock B is:
> | Time | ColumnB |
> |    1    |       2.0    |
> After the VerticallyConcatOperator, the result will be:
> | Time | ColumnA | ColumnB |
> |    1    |       1.0    |     2.0      |
>
> Literally, I think it's a horizontal concatenation. So I suggest rename it
> as HorizontallyConcatOperator.
>
> However, I asked the author about the reason for this name. He said, "From
> the view of a table, adding columns means vertical changes."
>
> What's your opinion?
>
> +1 for Plan A: Rename it as HorizontallyConcatOperator.
> +1 for Plan B: Keep current name VerticallyConcatOperator.
>
> --
> Best,
> Xiangwei Wei

Re: About naming of VerticallyConcatOperator

Posted by Xiangwei Wei <wx...@gmail.com>.
Sorry, the image can't displayed normally.

It's like:

To combine horizontally two DataFrames df1 and df2 with matching index:
import pandas as pd

df1 = pd.DataFrame
<https://www.skytowner.com/explore/pandas_dataframe_constructor>({'A':[1,2,3],
'B':[4,5,6]})
df2 = pd.DataFrame
<https://www.skytowner.com/explore/pandas_dataframe_constructor>({'C':[7,8,9],
'D':[10,11,12]})

df_concat = pd.concat
<https://www.skytowner.com/explore/pandas_concat_method>([df1, df2], axis=1)
df_concat
A B C D
0 1 4 7 10
1 2 5 8 11
2 3 6 9 12

Concatenate two matrices horizontally.

Create two matrices, and horizontally append the second matrix to the first
by using square bracket notation.

A = [1 2; 3 4]

A = *2×2*

     1     2
     3     4


B = [4 5 6; 7 8 9]

B = *2×3*

     4     5     6
     7     8     9


C = [A,B]

C = *2×5*

     1     2     4     5     6
     3     4     7     8     9



Reference:
[1]
https://www.skytowner.com/explore/concatenating_dataframes_horizontally_in_pandas
[2] https://www.mathworks.com/help//matlab/ref/double.horzcat.html
[3]
https://people.revoledu.com/kardi/tutorial/LinearAlgebra/HorzConcatenation.html

Xiangwei Wei <wx...@gmail.com> 于2023年2月6日周一 15:06写道:

> I investigated two typical situation like DataFrame in Pandas and Matrix
> in Matlab.
> They both expresses this as horizontally concatenation.
>
> [image: image.png]
>
> [image: image.png]
>
> [image: image.png]
>
> Jialin Qiao <qi...@apache.org> 于2023年2月6日周一 15:03写道:
>
>> +1 for Plan A: Rename it as HorizontallyConcatOperator.
>> —————————————————
>> Jialin Qiao
>> Apache IoTDB PMC
>>
>> Xiangwei Wei <wx...@gmail.com> 于2023年2月6日周一 14:35写道:
>> >
>> > VerticallyConcatOperator is used to horizontally concatenate TsBlocks
>> with
>> > the same timestamp column. For example,
>> > TsBlock A is:
>> > | Time | ColumnA |
>> > |    1    |     1.0    |
>> > TsBlock B is:
>> > | Time | ColumnB |
>> > |    1    |       2.0    |
>> > After the VerticallyConcatOperator, the result will be:
>> > | Time | ColumnA | ColumnB |
>> > |    1    |       1.0    |     2.0      |
>> >
>> > Literally, I think it's a horizontal concatenation. So I suggest rename
>> it
>> > as HorizontallyConcatOperator.
>> >
>> > However, I asked the author about the reason for this name. He said,
>> "From
>> > the view of a table, adding columns means vertical changes."
>> >
>> > What's your opinion?
>> >
>> > +1 for Plan A: Rename it as HorizontallyConcatOperator.
>> > +1 for Plan B: Keep current name VerticallyConcatOperator.
>> >
>> > --
>> > Best,
>> > Xiangwei Wei
>>
>
>
> --
> Best,
> Xiangwei Wei
>


-- 
Best,
Xiangwei Wei

Re: About naming of VerticallyConcatOperator

Posted by Xiangwei Wei <wx...@gmail.com>.
I investigated two typical situation like DataFrame in Pandas and Matrix in
Matlab.
They both expresses this as horizontally concatenation.

[image: image.png]

[image: image.png]

[image: image.png]

Jialin Qiao <qi...@apache.org> 于2023年2月6日周一 15:03写道:

> +1 for Plan A: Rename it as HorizontallyConcatOperator.
> —————————————————
> Jialin Qiao
> Apache IoTDB PMC
>
> Xiangwei Wei <wx...@gmail.com> 于2023年2月6日周一 14:35写道:
> >
> > VerticallyConcatOperator is used to horizontally concatenate TsBlocks
> with
> > the same timestamp column. For example,
> > TsBlock A is:
> > | Time | ColumnA |
> > |    1    |     1.0    |
> > TsBlock B is:
> > | Time | ColumnB |
> > |    1    |       2.0    |
> > After the VerticallyConcatOperator, the result will be:
> > | Time | ColumnA | ColumnB |
> > |    1    |       1.0    |     2.0      |
> >
> > Literally, I think it's a horizontal concatenation. So I suggest rename
> it
> > as HorizontallyConcatOperator.
> >
> > However, I asked the author about the reason for this name. He said,
> "From
> > the view of a table, adding columns means vertical changes."
> >
> > What's your opinion?
> >
> > +1 for Plan A: Rename it as HorizontallyConcatOperator.
> > +1 for Plan B: Keep current name VerticallyConcatOperator.
> >
> > --
> > Best,
> > Xiangwei Wei
>


-- 
Best,
Xiangwei Wei

Re: About naming of VerticallyConcatOperator

Posted by Jialin Qiao <qi...@apache.org>.
+1 for Plan A: Rename it as HorizontallyConcatOperator.
—————————————————
Jialin Qiao
Apache IoTDB PMC

Xiangwei Wei <wx...@gmail.com> 于2023年2月6日周一 14:35写道:
>
> VerticallyConcatOperator is used to horizontally concatenate TsBlocks with
> the same timestamp column. For example,
> TsBlock A is:
> | Time | ColumnA |
> |    1    |     1.0    |
> TsBlock B is:
> | Time | ColumnB |
> |    1    |       2.0    |
> After the VerticallyConcatOperator, the result will be:
> | Time | ColumnA | ColumnB |
> |    1    |       1.0    |     2.0      |
>
> Literally, I think it's a horizontal concatenation. So I suggest rename it
> as HorizontallyConcatOperator.
>
> However, I asked the author about the reason for this name. He said, "From
> the view of a table, adding columns means vertical changes."
>
> What's your opinion?
>
> +1 for Plan A: Rename it as HorizontallyConcatOperator.
> +1 for Plan B: Keep current name VerticallyConcatOperator.
>
> --
> Best,
> Xiangwei Wei