Files
doris/regression-test/data/ddl_p0/test_create_table_like.out
starocean999 cbaff8a700 [fix](nereids)change the decimal's precision and scale for cast(xx as decimal) (#36540)
pick from master #36316

expression cast( xx as decimal )'s datatype maybe decimalv3 or decimalv2
depending on enable_decimal_conversion value in fe conf file. if
enable_decimal_conversion is true, the datatype is decimalv3(9, 0), but
the datatype was decimalv3(38, 9) in 2.0 releases. So this pr change the
datatype same as 2.0 releases to keep the behavior consistent.
2024-06-20 17:46:11 +08:00

23 lines
1.2 KiB
Plaintext

-- This file is automatically generated. You should know what you did if you want to edit this
-- !desc_create_table --
decimal_test DUP_KEYS name VARCHAR(65533) VARCHAR(65533) Yes true \N true
id SMALLINT SMALLINT Yes false \N NONE true
timestamp0 DECIMAL(38, 9) DECIMALV3(38, 9) Yes false \N NONE true
timestamp1 DECIMAL DECIMALV3(10, 0) Yes false \N NONE true
timestamp2 DECIMAL(10, 1) DECIMALV3(10, 1) Yes false \N NONE true
timestamp3 DECIMAL DECIMALV3(10, 0) Yes false \N NONE true
timestamp4 DECIMAL(10, 1) DECIMALV3(10, 1) Yes false \N NONE true
-- !desc_create_table_like --
decimal_test_like DUP_KEYS name VARCHAR(65533) VARCHAR(65533) Yes true \N true
id SMALLINT SMALLINT Yes false \N NONE true
timestamp0 DECIMAL(38, 9) DECIMALV3(38, 9) Yes false \N NONE true
timestamp1 DECIMAL DECIMALV3(10, 0) Yes false \N NONE true
timestamp2 DECIMAL(10, 1) DECIMALV3(10, 1) Yes false \N NONE true
timestamp3 DECIMAL DECIMALV3(10, 0) Yes false \N NONE true
timestamp4 DECIMAL(10, 1) DECIMALV3(10, 1) Yes false \N NONE true
-- !select_table_like --
test1 1 123456789.000000000 1234567891 123456789.0 1234567891 123456789.0