Open bugmakerrrrrr opened 3 months ago
@LantaoJin friendly ping:)
Thanks for reporting this @bugmakerrrrrr .
MonthName
and DayName
are MySQL-like functions. I found this https://dev.mysql.com/doc/refman/8.0/en/server-system-variables.html#sysvar_lc_time_names. So in my opinion, it's not a bug as I said in https://github.com/opensearch-project/sql/pull/2685#issuecomment-2236908496. But I am not quite sure that should we continue to follow all MySQL principles. cc @dai-chen @penghuo.
Thanks for reporting this @bugmakerrrrrr .
MonthName
andDayName
are MySQL-like functions. I found this https://dev.mysql.com/doc/refman/8.0/en/server-system-variables.html#sysvar_lc_time_names. So in my opinion, it's not a bug as I said in #2685 (comment). But I am not quite sure that should we continue to follow all MySQL principles. cc @dai-chen @penghuo.
Thanks for you context. I found that the MySQL document said that the default value is 'en_US' regardless of your system's locale setting
, so if we need to follow the MySQL principle, should we change the locale to english?
so if we need to follow the MySQL principle, should we change the locale to english?
That's what I am not quite sure. OpenSearch SQL doesn't provide a system function/variable to set a lc_time_name, if we change it to Locale.ENGLISH
, it will restrict to English.
What is the bug? The monthName/dayName function uses Locale.getDefault to get the display name, which may return different results in different env and cause a test error.
Should we change the locale to
Locale.ENGLISH
?BTW, I found that the locale of
from_unixtime
function isLocale.ENGLISH
.