Skip to content

Commit

Permalink
[test](jdbc catalog) fix test_mysql_jdbc_catalog
Browse files Browse the repository at this point in the history
  • Loading branch information
zy-kkk committed Dec 25, 2024
1 parent a032ece commit 365b948
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -411,13 +411,13 @@ suite("test_mysql_jdbc_catalog", "p0,external,mysql,external_docker,external_doc
explain {
sql("select * from test_zd where date_add(d_z,interval 1 year) = '2023-01-01' order by 1;")

contains " QUERY: SELECT `id`, `d_z` FROM `doris_test`.`test_zd` WHERE (`d_z` = '2022-01-01')"
contains "QUERY: SELECT `id`, `d_z` FROM `doris_test`.`test_zd` WHERE (date_add(`d_z`, INTERVAL 1 YEAR) = '2023-01-01')"
}
order_qt_date_add_month """ select * from test_zd where date_add(d_z,interval 1 month) = '2022-02-01' order by 1; """
explain {
sql("select * from test_zd where date_add(d_z,interval 1 month) = '2022-02-01' order by 1;")

contains " QUERY: SELECT `id`, `d_z` FROM `doris_test`.`test_zd` WHERE (`d_z` = '2022-01-01')"
contains "QUERY: SELECT `id`, `d_z` FROM `doris_test`.`test_zd` WHERE (date_add(`d_z`, INTERVAL 1 MONTH) = '2022-02-01')"
}
order_qt_date_add_week """ select * from test_zd where date_add(d_z,interval 1 week) = '2022-01-08' order by 1; """
explain {
Expand Down Expand Up @@ -454,13 +454,13 @@ suite("test_mysql_jdbc_catalog", "p0,external,mysql,external_docker,external_doc
explain {
sql("select * from test_zd where date_sub(d_z,interval 1 year) = '2021-01-01' order by 1;")

contains " QUERY: SELECT `id`, `d_z` FROM `doris_test`.`test_zd` WHERE (`d_z` = '2022-01-01')"
contains "QUERY: SELECT `id`, `d_z` FROM `doris_test`.`test_zd` WHERE (date_sub(`d_z`, INTERVAL 1 YEAR) = '2021-01-01')"
}
order_qt_date_sub_month """ select * from test_zd where date_sub(d_z,interval 1 month) = '2021-12-01' order by 1; """
explain {
sql("select * from test_zd where date_sub(d_z,interval 1 month) = '2021-12-01' order by 1;")

contains " QUERY: SELECT `id`, `d_z` FROM `doris_test`.`test_zd` WHERE (`d_z` = '2022-01-01')"
contains "QUERY: SELECT `id`, `d_z` FROM `doris_test`.`test_zd` WHERE (date_sub(`d_z`, INTERVAL 1 MONTH) = '2021-12-01')"
}
order_qt_date_sub_week """ select * from test_zd where date_sub(d_z,interval 1 week) = '2021-12-25' order by 1; """
explain {
Expand Down

0 comments on commit 365b948

Please sign in to comment.