doris icon indicating copy to clipboard operation
doris copied to clipboard

[Enhancement] Add more schema change regression cases to enhance the quality of schema change

Open Lchangliang opened this issue 8 months ago • 0 comments

Search before asking

  • [X] 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

  1. Tests to delete and add columns of the same name
  2. Tests to change the type of non-key columns - agg_type needs to be specified

type

  1. Converts the tinyint type to [bigint, largeint, float, double, decimalv3, varchar, string]
  2. Converts the smallint type to [largeint, float, double, decimalv3, varchar, string]
  3. Converts the int type to [float, double, decimalv3, varchar, string]
  4. Converts the bigint type to [double, decimalv3, varchar, string]
  5. Converts the largeint type to [decimalv3, varchar, string]
  6. Converts the double type to [decimalv3, string]
  7. Converts the decimalv3 type to [decimalv3 with greater precision, string]
  8. Converts the date type to [datetime, datev2, datetimev2, string]
  9. Converts the datetime type to [date, datev2, datetimev2, string]
  10. Converts the datev2 type to [datetimev2, string]
  11. Converts the char type to [boolean, tinyint, smallint, int, bigint, largeint, float, double, char with longer length, varchar with longer length, string]
  12. The text(string) type cannot convert to other type

unique (mor and mow)

col

  1. Test columns of array type cannot be used as keys
  2. Test the nullable key cannot be modified

type

  1. Converts the date type to [datetime, datev2, datetimev2, string]
  2. Converts the datetime type to [date, datev2, datetimev2, string]
  3. Converts the datev2 type to [datetimev2, string]
  4. Converts the char type to [boolean, tinyint, smallint, int, bigint, largeint, float, double, char with longer length, varchar with longer length, string]
  5. The text(string) type cannot convert to other type

dup

col

  1. Paritition columns cannot be deleted
  2. Paritition columns cannot be modified

type

  1. The boolean type cannot convert to other type
  2. Converts the tinyint type to [bigint, largeint, float, double, decimalv3, varchar, string]
  3. Converts the smallint type to [largeint, float, double, decimalv3, varchar, string]
  4. Converts the int type to [float, double, decimalv3, varchar, string]
  5. Converts the bigint type to [double, decimalv3, varchar, string]
  6. Converts the largeint type to [decimalv3, varchar, string]
  7. Converts the double type to [decimalv3, string]
  8. Converts the decimalv3 type to [decimalv3 with greater precision, string]
  9. Converts the date type to [datetime, datev2, datetimev2, string]
  10. Converts the datetime type to [date, datev2, datetimev2, string]
  11. Converts the datev2 type to [datetimev2, string]
  12. Converts the char type to [boolean, tinyint, smallint, int, bigint, largeint, float, double, char with longer length, varchar with longer length, string]
  13. The text(string) type cannot convert to other type

Are you willing to submit PR?

  • [ ] Yes I am willing to submit a PR!

Code of Conduct

Lchangliang avatar May 31 '24 02:05 Lchangliang