[ 
https://issues.apache.org/jira/browse/DRILL-5043?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15674512#comment-15674512
 ] 

Nagarajan Chinnasamy commented on DRILL-5043:
---------------------------------------------

Thanks for the references.

Went through QueryContext.java, UserSession.java and ContextFunctions.java and 
understood how ContextInformation instance is injected into a function.

As per my understanding, there is no property in UserSession that can give a 
unique-id to represent a user session. So UserSession needs to be modified to 
introduce a new property that represents a session_id. But, I want to know what 
are the considerations that should go into having such a property. Can it be a 
simple "static" variable? what should be its datatype? Any clustered 
environment related points that I should take care???!!!! Is there already 
existing unique-id generator utility function that I can make use of?

Does it have to be a UDF? Why not another one of ContextFunctions???

Appreciate your inputs. Thanks.

> Function that returns a unique id per session/connection similar to MySQL's 
> CONNECTION_ID()
> -------------------------------------------------------------------------------------------
>
>                 Key: DRILL-5043
>                 URL: https://issues.apache.org/jira/browse/DRILL-5043
>             Project: Apache Drill
>          Issue Type: Improvement
>          Components: Functions - Drill
>    Affects Versions: 1.8.0
>            Reporter: Nagarajan Chinnasamy
>            Priority: Minor
>              Labels: CONNECTION_ID, SESSION, UDF
>
> Design and implement a function that returns a unique id per 
> session/connection similar to MySQL's CONNECTION_ID().



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to