[ https://issues.apache.org/jira/browse/CALCITE-2742?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16722353#comment-16722353 ]
Jacques Nadeau commented on CALCITE-2742: ----------------------------------------- Hi [~ptrbojko], your approach still couples the setting of USER to a static object ([CalcitePrincipalFairy|https://github.com/apache/calcite/pull/647/files#diff-4107ae612825659338abc402883163d2]). We're looking to be able to set this through DataContext directly. You should be able to update your patch on top of mine to still behave as you prefer by setting the DataContext properties. In general, I suggest you try to avoid using the static + thread local pattern as much as possible for this kind of thing as it assumes that all code will run within a single thread (which is definitely not necessarily the case for our use case). > Update RexImpTable to user DataContext to retrieve USER and SYSTEM_USER > ----------------------------------------------------------------------- > > Key: CALCITE-2742 > URL: https://issues.apache.org/jira/browse/CALCITE-2742 > Project: Calcite > Issue Type: Improvement > Reporter: Jacques Nadeau > Assignee: Jacques Nadeau > Priority: Major > > Right now, USER and SYSTEM_USER are hardcoded to "sa" and the system property > of user.name. Let's update them to use the DataContext system like the other > similar types of values. -- This message was sent by Atlassian JIRA (v7.6.3#76005)