matrixone icon indicating copy to clipboard operation
matrixone copied to clipboard

[Feature Request]: text data type

Open dengn opened this issue 3 years ago • 3 comments

Is there an existing issue for the same feature request?

  • [X] I have checked the existing issues.

Is your feature request related to a problem?

Text is a common data type.

Describe the feature you'd like

MO supports a single TEXT data type instead of tinytext, mediumtext, text, longtext of MySQL 8.0. It should cover the ranges of these four data types.

Describe implementation you've considered

No response

Documentation, Adoption, Use Case, Migration Strategy

No response

Additional information

No response

dengn avatar Jul 01 '22 03:07 dengn

This data type will follow these rules:

  1. The max length is 10485760(1GB). Error will be notified when out of range.
  2. DEFAULT in DDL and INDEX ON are not supported.
  3. All existing data types can be converted into text, including bigint/int/smallint/tinyint, float/double, char/varchar, decimal, date, datetime, timestamp and bool.
  4. Text can be castable to char/varchar,bigint/int/smallint/tinyint, float/double, char/varchar, date, datetime, timestamp and bool. When the length of text is longer than other types, errors will be notified.
  5. Text can be coercible to char/varchar,bigint/int/smallint/tinyint, float/double, char/varchar, date, timestamp and bool. When the length of text is longer than other types, errors will be notified.
  6. All functions of char and varchar need support TEXT data type as well.
  7. Other behavior of text is the same as varchar, including order by, group by, subquery and join.

domingozhang avatar Jul 13 '22 09:07 domingozhang

By following mysql, pg and oracle, there are some adjustment for char, varchar and text:

  1. The max size of char, varchar and text is 1GB.
  2. The function which text involved will convert text implicitly to varchar.

domingozhang avatar Jul 21 '22 10:07 domingozhang

we already support full feature for type text in pr #4168

bbbearxyz avatar Jul 22 '22 05:07 bbbearxyz

Can we recognize longtext, mediumtext and tinytext with a current MySQL sql statement? @bbbearxyz

dengn avatar Aug 19 '22 01:08 dengn

Can we recognize longtext, mediumtext and tinytext with a current MySQL sql statement? @bbbearxyz

no, we just use text type

bbbearxyz avatar Aug 22 '22 10:08 bbbearxyz

test done,bvt case done

heni02 avatar Nov 07 '22 02:11 heni02