[
https://issues.apache.org/jira/browse/CALCITE-6580?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17881708#comment-17881708
]
Julian Hyde edited comment on CALCITE-6580 at 9/13/24 10:16 PM:
----------------------------------------------------------------
Mihai is correct. The {{DAYNAME}} and {{MONTHNAME}} SQL functions (added in
CALCITE-2995) use the locale property via the
{{SqlFunctions.locale(DataContext)}} method. See [code
generation|https://github.com/apache/calcite/blob/91fe118d4f9592215ada50287a7039a27e0f2723/core/src/main/java/org/apache/calcite/adapter/enumerable/RexImpTable.java#L2582].
was (Author: julianhyde):
Mihai is correct. The {{DAYNAME}} and {{MONTHNAME}} SQL functions (added in
CALCITE-2995) use the locale property via the
{{SqlFunctions.locale(DataContext)}} method.
> Remove Locale.setDefault
> ------------------------
>
> Key: CALCITE-6580
> URL: https://issues.apache.org/jira/browse/CALCITE-6580
> Project: Calcite
> Issue Type: Improvement
> Reporter: Julian Hyde
> Priority: Major
> Labels: pull-request-available
>
> Remove all calls to {{Locale.setDefault}} in tests and production code.
> That function does not operate on the current thread; it affects all threads
> in the JVM. As such, it may affect other tests running at the same time, and
> affect other statements running at the same time.
> I hope, and believe, that the production code does not depend on
> {{Locale.getDefault}}. But let's make sure by removing {{setDefault}} from
> all tests.
> Add {{Locale.setDefault}} to
> [forbidden-apis|https://github.com/apache/calcite/blob/main/src/main/config/forbidden-apis/signatures.txt].
--
This message was sent by Atlassian Jira
(v8.20.10#820010)