Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CBRD-25302] added a shell test case for runtime error of TO_DATE(…, ..., 'en_US') #2003

Merged
merged 6 commits into from
Jan 2, 2025

Conversation

junsklee
Copy link
Contributor

@junsklee junsklee commented Dec 12, 2024

Refer to http://jira.cubrid.org/browse/CBRD-25302


Note: As of now, the cci answers for the following prepare statement:

prepare st from 'select TO_TIMESTAMP(?, ?, ?) from dual'; execute st using '01/11/1999 18:41:53', 'MM/DD/YYYY HH24:MI:SS', 'en_US'; drop prepare st;

differs from that of JDBC.

We need to verify if this is a CTP bug or a bug in the engine output (the former is more likely):

cci answer (answers/04_04_03_04_bfn_type_to_timestamp.answer_cci):

===================================================
to_timestamp( ?:0 , ?:1 , ?:2 )
1999-01-11 18:41:53

===================================================


jdbc answer (answers/04_04_03_04_bfn_type_to_timestamp.answer):

===================================================
to_timestamp( ?:0 , ?:1 , ?:2 )
1999-01-11 18:41:53.0

===================================================

@junsklee junsklee requested review from swi0110 and ctshim December 12, 2024 07:28
@ctshim ctshim requested a review from hyunikn December 12, 2024 23:39
@junsklee junsklee marked this pull request as ready for review December 16, 2024 01:16
@ctshim
Copy link
Contributor

ctshim commented Dec 16, 2024

"04_04_03_04_bfn_type_to_char.sql"에 새로 추가 된 TO_CHAR() 테스트 내용이 첫번째 인수가 NUMBER 계열만 있습니다.
DATE 계열인 케이스에 대해서도 추가 필요해 보입니다.
특히, langualge literal에 따라 결과 포맷이 다르게 보이는 부분을 이용해서 테스트 케이스를 만들면 더 좋은 예제가 되지 않을까 싶습니다.

@junsklee
Copy link
Contributor Author

"04_04_03_04_bfn_type_to_char.sql"에 새로 추가 된 TO_CHAR() 테스트 내용이 첫번째 인수가 NUMBER 계열만 있습니다. DATE 계열인 케이스에 대해서도 추가 필요해 보입니다. 특히, langualge literal에 따라 결과 포맷이 다르게 보이는 부분을 이용해서 테스트 케이스를 만들면 더 좋은 예제가 되지 않을까 싶습니다.

좋은 의견 감사합니다. 말씀해주신대로 TO_DATETIME() 및 TO_DATE() 를 TO_CHAR() 함수안에 사용하여 DATE 계열을 확인하도록 수정하였습니다.

DATE ex)
en_US: 11/jan/1999
ko_KR: 11/01/1999

DATETIME ex)
en_US: 06:41:53.733 PM 01/11/1999
ko_KR: 06:41:53.733 ohu 01/11/1999

@junsklee junsklee merged commit 818fc94 into CUBRID:develop Jan 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants