You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by GitBox <gi...@apache.org> on 2022/11/01 09:53:07 UTC
[GitHub] [doris] liaoxin01 opened a new pull request, #13872: [Enhancement][sequence-column] optimize the use of sequence column
liaoxin01 opened a new pull request, #13872:
URL: https://github.com/apache/doris/pull/13872
# Proposed changes
Issue Number: close #xxx
## Problem summary
When you create the Uniq table, you can specify the mapping of sequence column to other columns. You no longer need to specify mapping column when importing.
## Checklist(Required)
1. Does it affect the original behavior:
- [ ] Yes
- [ ] No
- [ ] I don't know
2. Has unit tests been added:
- [ ] Yes
- [ ] No
- [ ] No Need
3. Has document been added or modified:
- [ ] Yes
- [ ] No
- [ ] No Need
4. Does it need to update dependencies:
- [ ] Yes
- [ ] No
5. Are there any changes that cannot be rolled back:
- [ ] Yes (If Yes, please explain WHY)
- [ ] No
## Further comments
If this is a relatively large or complex change, kick off the discussion at [dev@doris.apache.org](mailto:dev@doris.apache.org) by explaining why you chose the solution you did and what alternatives you considered, etc...
--
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.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[GitHub] [doris] liaoxin01 commented on a diff in pull request #13872: [Enhancement](sequence-column) optimize the use of sequence column
Posted by GitBox <gi...@apache.org>.
liaoxin01 commented on code in PR #13872:
URL: https://github.com/apache/doris/pull/13872#discussion_r1012452571
##########
fe/fe-core/src/main/java/org/apache/doris/catalog/OlapTable.java:
##########
@@ -893,6 +893,21 @@ public void setBloomFilterInfo(Set<String> bfColumns, double bfFpp) {
this.bfFpp = bfFpp;
}
+ public String getSequenceMapCol() {
+ if (tableProperty == null) {
+ return null;
+ }
+ return tableProperty.getSequenceMapCol();
+ }
+
+ // map the sequence column to other column
+ public void setSequenceMapCol(String colName) {
+ if (tableProperty == null) {
+ tableProperty = new TableProperty(new HashMap<>());
+ }
+ tableProperty.setSequenceMapCol(colName);
Review Comment:
`this.hasSequenceCol` is set by `setSequenceInfo` function in InternalCatalog line 2026.
--
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.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[GitHub] [doris] zhannngchen commented on a diff in pull request #13872: [Enhancement](sequence-column) optimize the use of sequence column
Posted by GitBox <gi...@apache.org>.
zhannngchen commented on code in PR #13872:
URL: https://github.com/apache/doris/pull/13872#discussion_r1012686598
##########
docs/zh-CN/docs/data-operate/update-delete/sequence-column-manual.md:
##########
@@ -64,15 +64,24 @@ Sequence列建表时在property中增加了一个属性,用来标识`__DORIS_S
**建表**
-创建Uniq表时,可以指定sequence列类型
+方法一:创建Uniq表时,可以指定sequence列到其他column的映射。
+
+```text
+PROPERTIES (
+ "function_column.sequence_col" = 'column_name',
+);
+```
+sequence_col用来指定sequence列到其他column的映射,该列可以为整型和时间类型(DATE、DATETIME),创建后不能更改该列的类型。导入时不用再指定映射列。如果设置了`function_column.sequence_col`, `function_column.sequence_type`将被忽略。
+
+方法二:创建Uniq表时,可以指定sequence列类型。
Review Comment:
后边的例子都得跟着改一下,去掉那些 load 的用法说明,最后的示例也要跟着改掉
--
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.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[GitHub] [doris] liaoxin01 commented on a diff in pull request #13872: [Enhancement](sequence-column) optimize the use of sequence column
Posted by GitBox <gi...@apache.org>.
liaoxin01 commented on code in PR #13872:
URL: https://github.com/apache/doris/pull/13872#discussion_r1012461607
##########
fe/fe-core/src/main/java/org/apache/doris/planner/BrokerScanNode.java:
##########
@@ -277,9 +278,13 @@ private void initColumns(ParamCreateContext context) throws UserException {
columnDescs.descs.add(ImportColumnDesc.newDeleteSignImportColumnDesc(new IntLiteral(1)));
}
// add columnExpr for sequence column
- if (context.fileGroup.hasSequenceCol()) {
+ if (targetTable instanceof OlapTable && ((OlapTable) targetTable).hasSequenceCol()) {
Review Comment:
done.
--
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.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[GitHub] [doris] zhannngchen commented on pull request #13872: [Enhancement](sequence-column) optimize the use of sequence column
Posted by GitBox <gi...@apache.org>.
zhannngchen commented on PR #13872:
URL: https://github.com/apache/doris/pull/13872#issuecomment-1311267357
LGTM
--
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.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[GitHub] [doris] morningman merged pull request #13872: [Enhancement](sequence-column) optimize the use of sequence column
Posted by GitBox <gi...@apache.org>.
morningman merged PR #13872:
URL: https://github.com/apache/doris/pull/13872
--
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.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[GitHub] [doris] zhannngchen commented on a diff in pull request #13872: [Enhancement](sequence-column) optimize the use of sequence column
Posted by GitBox <gi...@apache.org>.
zhannngchen commented on code in PR #13872:
URL: https://github.com/apache/doris/pull/13872#discussion_r1012890170
##########
docs/en/docs/data-operate/update-delete/sequence-column-manual.md:
##########
@@ -60,13 +60,21 @@ The principle is the same as the reading process during Base Compaction.
When the Sequence column creates a table, an attribute is added to the property, which is used to identify the type import of `__DORIS_SEQUENCE_COL__`. The grammar design is mainly to add a mapping from the sequence column to other columns. The settings of each seed method will be described below introduce.
#### Create Table
-When you create the Uniq table, you can specify the sequence column type.
+1. When you create the Uniq table, you can specify the mapping of sequence column to other columns.
+```text
+PROPERTIES (
+ "function_column.sequence_col" = 'column_name',
Review Comment:
pls also update `create-table.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.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[GitHub] [doris] dataroaring commented on a diff in pull request #13872: [Enhancement](sequence-column) optimize the use of sequence column
Posted by GitBox <gi...@apache.org>.
dataroaring commented on code in PR #13872:
URL: https://github.com/apache/doris/pull/13872#discussion_r1011384252
##########
docs/zh-CN/docs/data-operate/update-delete/sequence-column-manual.md:
##########
@@ -64,15 +64,24 @@ Sequence列建表时在property中增加了一个属性,用来标识`__DORIS_S
**建表**
-创建Uniq表时,可以指定sequence列类型
+方法一:创建Uniq表时,可以指定sequence列类型。
```text
PROPERTIES (
"function_column.sequence_type" = 'Date',
);
```
-sequence_type用来指定sequence列的类型,可以为整型和时间类型(DATE、DATETIME)。
+sequence_type用来指定sequence列的类型,可以为整型和时间类型(DATE、DATETIME)。导入时需要指定映射列。
+
+方法二:创建Uniq表时,可以指定sequence列到其他column的映射。
+
+```text
+PROPERTIES (
+ "function_column.sequence_col" = 'column_name',
+);
+```
+sequence_col用来指定sequence列到其他column的映射,该列可以为整型和时间类型(DATE、DATETIME),创建后不能更改该列的类型。导入时不用再指定映射列。
Review Comment:
Refer to comment in en doc.
##########
docs/en/docs/data-operate/update-delete/sequence-column-manual.md:
##########
@@ -60,13 +60,21 @@ The principle is the same as the reading process during Base Compaction.
When the Sequence column creates a table, an attribute is added to the property, which is used to identify the type import of `__DORIS_SEQUENCE_COL__`. The grammar design is mainly to add a mapping from the sequence column to other columns. The settings of each seed method will be described below introduce.
#### Create Table
-When you create the Uniq table, you can specify the sequence column type.
+1. When you create the Uniq table, you can specify the sequence column type.
```text
PROPERTIES (
"function_column.sequence_type" = 'Date',
);
```
-The sequence_type is used to specify the type of the sequence column, which can be integral and time (DATE / DATETIME).
+The sequence_type is used to specify the type of the sequence column, which can be integral and time (DATE / DATETIME). The mapping column needs to be specified when importing.
+
+2. When you create the Uniq table, you can specify the mapping of sequence column to other columns.
+```text
+PROPERTIES (
+ "function_column.sequence_col" = 'column_name',
+);
+```
+The sequence_col is used to specify the mapping of the sequence column to other columns, which can be integral and time (DATE, DATETIME). The type of this column cannot be changed after creation. You no longer need to specify mapping column when importing.
Review Comment:
If function_column.sequence_col is set, function_column.sequence_type is ignored.
##########
docs/en/docs/data-operate/update-delete/sequence-column-manual.md:
##########
@@ -60,13 +60,21 @@ The principle is the same as the reading process during Base Compaction.
When the Sequence column creates a table, an attribute is added to the property, which is used to identify the type import of `__DORIS_SEQUENCE_COL__`. The grammar design is mainly to add a mapping from the sequence column to other columns. The settings of each seed method will be described below introduce.
#### Create Table
-When you create the Uniq table, you can specify the sequence column type.
+1. When you create the Uniq table, you can specify the sequence column type.
```text
PROPERTIES (
"function_column.sequence_type" = 'Date',
);
```
-The sequence_type is used to specify the type of the sequence column, which can be integral and time (DATE / DATETIME).
+The sequence_type is used to specify the type of the sequence column, which can be integral and time (DATE / DATETIME). The mapping column needs to be specified when importing.
+
+2. When you create the Uniq table, you can specify the mapping of sequence column to other columns.
Review Comment:
Put this method as the 1st one.
--
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.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[GitHub] [doris] morningman commented on a diff in pull request #13872: [Enhancement](sequence-column) optimize the use of sequence column
Posted by GitBox <gi...@apache.org>.
morningman commented on code in PR #13872:
URL: https://github.com/apache/doris/pull/13872#discussion_r1011875780
##########
fe/fe-core/src/main/java/org/apache/doris/catalog/Env.java:
##########
@@ -4125,6 +4131,11 @@ private void renameColumn(Database db, OlapTable table, String colName,
}
}
+ // 5. modify sequence map col
+ if (table.hasSequenceCol() && table.getSequenceMapCol().equalsIgnoreCase(colName)) {
Review Comment:
Please add regression test to cover this "rename column" case
##########
fe/fe-core/src/main/java/org/apache/doris/catalog/OlapTable.java:
##########
@@ -893,6 +893,21 @@ public void setBloomFilterInfo(Set<String> bfColumns, double bfFpp) {
this.bfFpp = bfFpp;
}
+ public String getSequenceMapCol() {
+ if (tableProperty == null) {
+ return null;
+ }
+ return tableProperty.getSequenceMapCol();
+ }
+
+ // map the sequence column to other column
+ public void setSequenceMapCol(String colName) {
+ if (tableProperty == null) {
+ tableProperty = new TableProperty(new HashMap<>());
+ }
+ tableProperty.setSequenceMapCol(colName);
Review Comment:
Forget to set `this.hasSequenceCol`?
##########
fe/fe-core/src/main/java/org/apache/doris/planner/BrokerScanNode.java:
##########
@@ -277,9 +278,13 @@ private void initColumns(ParamCreateContext context) throws UserException {
columnDescs.descs.add(ImportColumnDesc.newDeleteSignImportColumnDesc(new IntLiteral(1)));
}
// add columnExpr for sequence column
- if (context.fileGroup.hasSequenceCol()) {
+ if (targetTable instanceof OlapTable && ((OlapTable) targetTable).hasSequenceCol()) {
Review Comment:
Please also modify `LoadScanProvider`, line 194
--
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.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[GitHub] [doris] zhannngchen commented on a diff in pull request #13872: [Enhancement](sequence-column) optimize the use of sequence column
Posted by GitBox <gi...@apache.org>.
zhannngchen commented on code in PR #13872:
URL: https://github.com/apache/doris/pull/13872#discussion_r1012889215
##########
fe/fe-core/src/main/java/org/apache/doris/alter/SchemaChangeHandler.java:
##########
@@ -574,6 +574,12 @@ private void processModifyColumn(ModifyColumnClause alterClause, OlapTable olapT
throw new DdlException("Column[" + columnPos.getLastCol() + "] does not exists");
}
+ // sequence col can not change type
Review Comment:
Can user add this property by alter table? seem we didn't disable this behavior?
##########
fe/fe-core/src/main/java/org/apache/doris/alter/SchemaChangeHandler.java:
##########
@@ -574,6 +574,12 @@ private void processModifyColumn(ModifyColumnClause alterClause, OlapTable olapT
throw new DdlException("Column[" + columnPos.getLastCol() + "] does not exists");
}
+ // sequence col can not change type
Review Comment:
Can user add this property by alter table? seems we didn't disable this behavior?
--
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.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[GitHub] [doris] hello-stephen commented on pull request #13872: [Enhancement](sequence-column) optimize the use of sequence column
Posted by GitBox <gi...@apache.org>.
hello-stephen commented on PR #13872:
URL: https://github.com/apache/doris/pull/13872#issuecomment-1298712060
TeamCity pipeline, clickbench performance test result:
the sum of best hot time: 38.5 seconds
load time: 610 seconds
storage size: 17154865268 Bytes
https://doris-community-test-1308700295.cos.ap-hongkong.myqcloud.com/tmp/20221101153320_clickbench_pr_37657.html
--
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.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[GitHub] [doris] liaoxin01 commented on a diff in pull request #13872: [Enhancement](sequence-column) optimize the use of sequence column
Posted by GitBox <gi...@apache.org>.
liaoxin01 commented on code in PR #13872:
URL: https://github.com/apache/doris/pull/13872#discussion_r1014764220
##########
fe/fe-core/src/main/java/org/apache/doris/alter/SchemaChangeHandler.java:
##########
@@ -574,6 +574,12 @@ private void processModifyColumn(ModifyColumnClause alterClause, OlapTable olapT
throw new DdlException("Column[" + columnPos.getLastCol() + "] does not exists");
}
+ // sequence col can not change type
Review Comment:
It is not yet supported to add the property by alter table.
--
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.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[GitHub] [doris] github-actions[bot] commented on pull request #13872: [Enhancement](sequence-column) optimize the use of sequence column
Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on PR #13872:
URL: https://github.com/apache/doris/pull/13872#issuecomment-1311267816
PR approved by anyone and no changes requested.
--
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.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[GitHub] [doris] liaoxin01 commented on a diff in pull request #13872: [Enhancement](sequence-column) optimize the use of sequence column
Posted by GitBox <gi...@apache.org>.
liaoxin01 commented on code in PR #13872:
URL: https://github.com/apache/doris/pull/13872#discussion_r1012461500
##########
fe/fe-core/src/main/java/org/apache/doris/catalog/Env.java:
##########
@@ -4125,6 +4131,11 @@ private void renameColumn(Database db, OlapTable table, String colName,
}
}
+ // 5. modify sequence map col
+ if (table.hasSequenceCol() && table.getSequenceMapCol().equalsIgnoreCase(colName)) {
Review Comment:
done.
--
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.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[GitHub] [doris] zhannngchen commented on a diff in pull request #13872: [Enhancement](sequence-column) optimize the use of sequence column
Posted by GitBox <gi...@apache.org>.
zhannngchen commented on code in PR #13872:
URL: https://github.com/apache/doris/pull/13872#discussion_r1012676443
##########
fe/fe-core/src/test/java/org/apache/doris/catalog/CreateTableTest.java:
##########
@@ -208,6 +208,15 @@ public void testNormal() throws DdlException {
+ "distributed by hash(k2) buckets 1\n"
+ "properties('replication_num' = '1');"));
+ // table with sequence col
+ ExceptionChecker
Review Comment:
We also need a ut for alter table?
##########
docs/zh-CN/docs/data-operate/update-delete/sequence-column-manual.md:
##########
@@ -64,15 +64,24 @@ Sequence列建表时在property中增加了一个属性,用来标识`__DORIS_S
**建表**
-创建Uniq表时,可以指定sequence列类型
+方法一:创建Uniq表时,可以指定sequence列到其他column的映射。
+
+```text
+PROPERTIES (
+ "function_column.sequence_col" = 'column_name',
+);
+```
+sequence_col用来指定sequence列到其他column的映射,该列可以为整型和时间类型(DATE、DATETIME),创建后不能更改该列的类型。导入时不用再指定映射列。如果设置了`function_column.sequence_col`, `function_column.sequence_type`将被忽略。
+
+方法二:创建Uniq表时,可以指定sequence列类型。
Review Comment:
We'd better hide the usage of method 2, it's only for compatibility to keep the old impl.
--
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.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[GitHub] [doris] liaoxin01 commented on a diff in pull request #13872: [Enhancement](sequence-column) optimize the use of sequence column
Posted by GitBox <gi...@apache.org>.
liaoxin01 commented on code in PR #13872:
URL: https://github.com/apache/doris/pull/13872#discussion_r1012461711
##########
docs/en/docs/data-operate/update-delete/sequence-column-manual.md:
##########
@@ -60,13 +60,21 @@ The principle is the same as the reading process during Base Compaction.
When the Sequence column creates a table, an attribute is added to the property, which is used to identify the type import of `__DORIS_SEQUENCE_COL__`. The grammar design is mainly to add a mapping from the sequence column to other columns. The settings of each seed method will be described below introduce.
#### Create Table
-When you create the Uniq table, you can specify the sequence column type.
+1. When you create the Uniq table, you can specify the sequence column type.
```text
PROPERTIES (
"function_column.sequence_type" = 'Date',
);
```
-The sequence_type is used to specify the type of the sequence column, which can be integral and time (DATE / DATETIME).
+The sequence_type is used to specify the type of the sequence column, which can be integral and time (DATE / DATETIME). The mapping column needs to be specified when importing.
+
+2. When you create the Uniq table, you can specify the mapping of sequence column to other columns.
Review Comment:
done.
--
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.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[GitHub] [doris] liaoxin01 commented on a diff in pull request #13872: [Enhancement](sequence-column) optimize the use of sequence column
Posted by GitBox <gi...@apache.org>.
liaoxin01 commented on code in PR #13872:
URL: https://github.com/apache/doris/pull/13872#discussion_r1014764040
##########
docs/en/docs/data-operate/update-delete/sequence-column-manual.md:
##########
@@ -60,13 +60,21 @@ The principle is the same as the reading process during Base Compaction.
When the Sequence column creates a table, an attribute is added to the property, which is used to identify the type import of `__DORIS_SEQUENCE_COL__`. The grammar design is mainly to add a mapping from the sequence column to other columns. The settings of each seed method will be described below introduce.
#### Create Table
-When you create the Uniq table, you can specify the sequence column type.
+1. When you create the Uniq table, you can specify the mapping of sequence column to other columns.
+```text
+PROPERTIES (
+ "function_column.sequence_col" = 'column_name',
Review Comment:
done.
--
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.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[GitHub] [doris] liaoxin01 commented on a diff in pull request #13872: [Enhancement](sequence-column) optimize the use of sequence column
Posted by GitBox <gi...@apache.org>.
liaoxin01 commented on code in PR #13872:
URL: https://github.com/apache/doris/pull/13872#discussion_r1012864447
##########
docs/zh-CN/docs/data-operate/update-delete/sequence-column-manual.md:
##########
@@ -64,15 +64,24 @@ Sequence列建表时在property中增加了一个属性,用来标识`__DORIS_S
**建表**
-创建Uniq表时,可以指定sequence列类型
+方法一:创建Uniq表时,可以指定sequence列到其他column的映射。
+
+```text
+PROPERTIES (
+ "function_column.sequence_col" = 'column_name',
+);
+```
+sequence_col用来指定sequence列到其他column的映射,该列可以为整型和时间类型(DATE、DATETIME),创建后不能更改该列的类型。导入时不用再指定映射列。如果设置了`function_column.sequence_col`, `function_column.sequence_type`将被忽略。
+
+方法二:创建Uniq表时,可以指定sequence列类型。
Review Comment:
感觉可以先留着,原来的方式比较灵活,有些场景用户可以就要单独指定一列数据作为sequence列,先试用看看,逐步再去删掉原来的方案。
--
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.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[GitHub] [doris] liaoxin01 commented on a diff in pull request #13872: [Enhancement](sequence-column) optimize the use of sequence column
Posted by GitBox <gi...@apache.org>.
liaoxin01 commented on code in PR #13872:
URL: https://github.com/apache/doris/pull/13872#discussion_r1012859575
##########
fe/fe-core/src/test/java/org/apache/doris/catalog/CreateTableTest.java:
##########
@@ -208,6 +208,15 @@ public void testNormal() throws DdlException {
+ "distributed by hash(k2) buckets 1\n"
+ "properties('replication_num' = '1');"));
+ // table with sequence col
+ ExceptionChecker
Review Comment:
done.
--
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.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org