-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Closed
Labels
Description
Search before asking
- I had searched in the issues and found no similar issues.
Description
We need to test schema change at different latitudes to make sure it is correct.The following will provide some functional tests for interested students to implement. By implementing these functional tests, you can increase your understanding of doris and contribute to the doris community!
If you want to pick the cases,the format example is [One-dimensional][table][agg][col][1]. If you finish the cases, you need to add pr-link after the comment, such as [One-dimensional][table][agg][col][1] pr-link.
You can refer to pr https://github.com/apache/doris/pull/34717/files.
Solution
One-dimensional test
table dimensional
agg
col
- Tests to delete and add columns of the same name
- Tests to change the type of non-key columns - agg_type needs to be specified
type
- Converts the tinyint type to [bigint, largeint, float, double, decimalv3, varchar, string]
- Converts the smallint type to [largeint, float, double, decimalv3, varchar, string]
- Converts the int type to [float, double, decimalv3, varchar, string]
- Converts the bigint type to [double, decimalv3, varchar, string]
- Converts the largeint type to [decimalv3, varchar, string]
- Converts the double type to [decimalv3, string]
- Converts the decimalv3 type to [decimalv3 with greater precision, string]
- Converts the date type to [datetime, datev2, datetimev2, string]
- Converts the datetime type to [date, datev2, datetimev2, string]
- Converts the datev2 type to [datetimev2, string]
- Converts the char type to [boolean, tinyint, smallint, int, bigint, largeint, float, double, char with longer length, varchar with longer length, string]
- The text(string) type cannot convert to other type
unique (mor and mow)
col
- Test columns of array type cannot be used as keys
- Test the nullable key cannot be modified
type
- Converts the date type to [datetime, datev2, datetimev2, string]
- Converts the datetime type to [date, datev2, datetimev2, string]
- Converts the datev2 type to [datetimev2, string]
- Converts the char type to [boolean, tinyint, smallint, int, bigint, largeint, float, double, char with longer length, varchar with longer length, string]
- The text(string) type cannot convert to other type
dup
col
- Paritition columns cannot be deleted
- Paritition columns cannot be modified
type
- The boolean type cannot convert to other type
- Converts the tinyint type to [bigint, largeint, float, double, decimalv3, varchar, string]
- Converts the smallint type to [largeint, float, double, decimalv3, varchar, string]
- Converts the int type to [float, double, decimalv3, varchar, string]
- Converts the bigint type to [double, decimalv3, varchar, string]
- Converts the largeint type to [decimalv3, varchar, string]
- Converts the double type to [decimalv3, string]
- Converts the decimalv3 type to [decimalv3 with greater precision, string]
- Converts the date type to [datetime, datev2, datetimev2, string]
- Converts the datetime type to [date, datev2, datetimev2, string]
- Converts the datev2 type to [datetimev2, string]
- Converts the char type to [boolean, tinyint, smallint, int, bigint, largeint, float, double, char with longer length, varchar with longer length, string]
- The text(string) type cannot convert to other type
property dimensional
table
- Test whether modify the dynamic_partition or not
- Test whether modify the properties [distribution_type, batch_delete, function_column.sequence_type, disable_storage_row_cache, driver, light_schema_change, colocate_with, replication_num, storage policy] or not.
- Test add/drop index [ngram bloom filter, inverted index]
- Test modify tablet/column annotation.
- Test rename the table name.
partition
- auto partition. Test the correctness that different schemas in different partition. For example, create a table partitions by mins. Insert some datas into first partition and wait to create second partition and than add/drop column and insert some datas into second partition, finally read it.
- Test whether modify the properties [partition_desc, bucket number, bucket key, distribution_desc, default partition, storage_medium, storage_cooldown_time, replication_num] or not.
Two-dimensional test
Query
- Tests do scheam change [add/drop key/value, modify column type, modify column length] during query
- Tests add/drop/modify index during query
- Tests modify table properties during query
- Tests modify partition properties during query
Analyze
- Test auto/Manual analyze Before and after schema change.
Are you willing to submit PR?
- Yes I am willing to submit a PR!
Code of Conduct
- I agree to follow this project's Code of Conduct