[jira] [Commented] (DRILL-5043) Function that returns a unique id per session/connection similar to MySQL's CONNECTION_ID()
[ https://issues.apache.org/jira/browse/DRILL-5043?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15860022#comment-15860022 ] ASF GitHub Bot commented on DRILL-5043: --- Github user nagarajanchinnasamy closed the pull request at: https://github.com/apache/drill/pull/685 > 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, doc-impacting > Fix For: 1.10.0 > > Attachments: 01_session_id_sqlline.png, > 02_session_id_webconsole_query.png, 03_session_id_webconsole_result.png > > > Design and implement a function that returns a unique id per > session/connection similar to MySQL's CONNECTION_ID(). > *Implementation details* > function *session_id* will be added. Function returns current session unique > id represented as string. Parameter {code:java} boolean isNiladic{code} will > be added to UDF FunctionTemplate to indicate if a function is niladic (a > function to be called without any parameters and parentheses) > Please note, this function will override columns that have the same name. > Table alias should be used to retrieve column value from table. > Example: > {code:sql}select session_id from // returns the value of niladic > function session_id {code} > {code:sql}select t1.session_id from t1 // returns session_id column > value from table {code} -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Commented] (DRILL-5043) Function that returns a unique id per session/connection similar to MySQL's CONNECTION_ID()
[ https://issues.apache.org/jira/browse/DRILL-5043?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15853764#comment-15853764 ] Arina Ielchiieva commented on DRILL-5043: - Merged into master with commit id 31b52827767214b7bd92881b322567310be601dd > 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, doc-impacting > Fix For: 1.10.0 > > Attachments: 01_session_id_sqlline.png, > 02_session_id_webconsole_query.png, 03_session_id_webconsole_result.png > > > Design and implement a function that returns a unique id per > session/connection similar to MySQL's CONNECTION_ID(). > *Implementation details* > function *session_id* will be added. Function returns current session unique > id represented as string. Parameter {code:java} boolean isNiladic{code} will > be added to UDF FunctionTemplate to indicate if a function is niladic (a > function to be called without any parameters and parentheses) > Please note, this function will override columns that have the same name. > Table alias should be used to retrieve column value from table. > Example: > {code:sql}select session_id from // returns the value of niladic > function session_id {code} > {code:sql}select t1.session_id from t1 // returns session_id column > value from table {code} -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Commented] (DRILL-5043) Function that returns a unique id per session/connection similar to MySQL's CONNECTION_ID()
[ https://issues.apache.org/jira/browse/DRILL-5043?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15779836#comment-15779836 ] Nagarajan Chinnasamy commented on DRILL-5043: - Waiting for input from community on how to make session_id work without parenthesis while calling. Appreciate your inputs. This is the only task pending from my side. > 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 > Fix For: Future > > Attachments: 01_session_id_sqlline.png, > 02_session_id_webconsole_query.png, 03_session_id_webconsole_result.png > > > 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)
[jira] [Commented] (DRILL-5043) Function that returns a unique id per session/connection similar to MySQL's CONNECTION_ID()
[ https://issues.apache.org/jira/browse/DRILL-5043?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15754291#comment-15754291 ] ASF GitHub Bot commented on DRILL-5043: --- GitHub user nagarajanchinnasamy reopened a pull request: https://github.com/apache/drill/pull/685 Drill 5043: Function that returns a unique id per session/connection similar to MySQL's CONNECTION_ID() Please check [DRILL-5043](https://issues.apache.org/jira/browse/DRILL-5043) for the details on changes made and other details. You can merge this pull request into a Git repository by running: $ git pull https://github.com/nagarajanchinnasamy/drill DRILL-5043 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/drill/pull/685.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #685 commit 3062d6052525524bacaad35765ff62b96ff31a42 Author: Nagarajan ChinnasamyDate: 2016-12-15T14:18:39Z DRILL-5043: Function that returns a unique id per session/connection similar to MySQL's CONNECTION_ID() #685 > 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, ready-to-commit > Fix For: Future > > Attachments: 01_session_id_sqlline.png, > 02_session_id_webconsole_query.png, 03_session_id_webconsole_result.png > > > 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)
[jira] [Commented] (DRILL-5043) Function that returns a unique id per session/connection similar to MySQL's CONNECTION_ID()
[ https://issues.apache.org/jira/browse/DRILL-5043?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15754290#comment-15754290 ] ASF GitHub Bot commented on DRILL-5043: --- Github user nagarajanchinnasamy closed the pull request at: https://github.com/apache/drill/pull/685 > 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, ready-to-commit > Fix For: Future > > Attachments: 01_session_id_sqlline.png, > 02_session_id_webconsole_query.png, 03_session_id_webconsole_result.png > > > 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)
[jira] [Commented] (DRILL-5043) Function that returns a unique id per session/connection similar to MySQL's CONNECTION_ID()
[ https://issues.apache.org/jira/browse/DRILL-5043?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15741350#comment-15741350 ] ASF GitHub Bot commented on DRILL-5043: --- Github user arina-ielchiieva commented on the issue: https://github.com/apache/drill/pull/685 @nagarajanchinnasamy 1. Please address minor changes in review comments. 2. Squash / fixup everything in one commit. 3. Update commit message: Jira-number: Jira name (ex: DRILL-5043: Function that returns a unique id per session/connection similar to MySQL's CONNECTION_ID()). 4. Add unit test in TestContextFunctions, let's say compare that when you two times call session_id() in different queries and in the same query you'll get the same result. > 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 > Attachments: 01_session_id_sqlline.png, > 02_session_id_webconsole_query.png, 03_session_id_webconsole_result.png > > > 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)
[jira] [Commented] (DRILL-5043) Function that returns a unique id per session/connection similar to MySQL's CONNECTION_ID()
[ https://issues.apache.org/jira/browse/DRILL-5043?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15736972#comment-15736972 ] Nagarajan Chinnasamy commented on DRILL-5043: - Yes... Got this feedback from reviews on GitHub. Looking at https://issues.apache.org/jira/browse/DRILL-4956. 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 > Attachments: 01_session_id_sqlline.png, > 02_session_id_webconsole_query.png, 03_session_id_webconsole_result.png > > > 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)
[jira] [Commented] (DRILL-5043) Function that returns a unique id per session/connection similar to MySQL's CONNECTION_ID()
[ https://issues.apache.org/jira/browse/DRILL-5043?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15734779#comment-15734779 ] Khurram Faraaz commented on DRILL-5043: --- [~nagarajanchinnasamy] you may want to take a look at DRILL-4956, that feature uses a unique session ID to identify temporary tables in Drill, you should look at how unique session IDs are implemented for temporary tables there. > 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 > Attachments: 01_session_id_sqlline.png, > 02_session_id_webconsole_query.png, 03_session_id_webconsole_result.png > > > 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)
[jira] [Commented] (DRILL-5043) Function that returns a unique id per session/connection similar to MySQL's CONNECTION_ID()
[ https://issues.apache.org/jira/browse/DRILL-5043?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15734465#comment-15734465 ] Nagarajan Chinnasamy commented on DRILL-5043: - While this solution seems to work in an embedded installation, I have doubt if it will work in a distributed installation --- as the SessionId is locally generated inside a JVM. We may have to look for zookeeper based solution to get a unique SessionId across the DrillBits. Need your guidelines as how to approach this problem. > 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 > Attachments: 01_session_id_sqlline.png, > 02_session_id_webconsole_query.png, 03_session_id_webconsole_result.png > > > 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)
[jira] [Commented] (DRILL-5043) Function that returns a unique id per session/connection similar to MySQL's CONNECTION_ID()
[ https://issues.apache.org/jira/browse/DRILL-5043?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15732216#comment-15732216 ] Nagarajan Chinnasamy commented on DRILL-5043: - Hi Gautam, I have submitted the pull request. The link is: https://github.com/apache/drill/pull/685 > 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 > Attachments: 01_session_id_sqlline.png, > 02_session_id_webconsole_query.png, 03_session_id_webconsole_result.png > > > 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)
[jira] [Commented] (DRILL-5043) Function that returns a unique id per session/connection similar to MySQL's CONNECTION_ID()
[ https://issues.apache.org/jira/browse/DRILL-5043?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15732207#comment-15732207 ] ASF GitHub Bot commented on DRILL-5043: --- GitHub user nagarajanchinnasamy opened a pull request: https://github.com/apache/drill/pull/685 Drill 5043: Function that returns a unique id per session/connection similar to MySQL's CONNECTION_ID() Please check [DRILL-5043](https://issues.apache.org/jira/browse/DRILL-5043) for the details on changes made and other details. You can merge this pull request into a Git repository by running: $ git pull https://github.com/nagarajanchinnasamy/drill DRILL-5043 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/drill/pull/685.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #685 commit a579e1beaa5ea65c30a08f55abe41a689d8d6ead Author: Nagarajan ChinnasamyDate: 2016-11-19T15:23:34Z [DRILL-5043] Added session_id() to ContextFunctions - Initial changes commit a29269b7368de022eb7360b22315cf9471bf8f62 Author: Nagarajan Chinnasamy Date: 2016-11-19T15:38:46Z Merge https://github.com/apache/drill > 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 > Attachments: 01_session_id_sqlline.png, > 02_session_id_webconsole_query.png, 03_session_id_webconsole_result.png > > > 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)
[jira] [Commented] (DRILL-5043) Function that returns a unique id per session/connection similar to MySQL's CONNECTION_ID()
[ https://issues.apache.org/jira/browse/DRILL-5043?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15726877#comment-15726877 ] Gautam Kumar Parai commented on DRILL-5043: --- Hi Nagarajan, Any updates? Regarding your questions: {quote} I am not sure about one change I made in BitControl.java in the following block: {quote} It should be 32 instead of 36 {quote} Also, I am not sure how to incorporate session_id into "descriptorData" static variable that is initialized at line number 9073 in BitControl.java. Please advice. {quote} I think no change is required. Can you please post the pull request? We can only start the review process when we have a pull request. > 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 > Attachments: 01_session_id_sqlline.png, > 02_session_id_webconsole_query.png, 03_session_id_webconsole_result.png > > > 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)
[jira] [Commented] (DRILL-5043) Function that returns a unique id per session/connection similar to MySQL's CONNECTION_ID()
[ https://issues.apache.org/jira/browse/DRILL-5043?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15684255#comment-15684255 ] Nagarajan Chinnasamy commented on DRILL-5043: - Its OK... Sorry I don't think i created branch...my badsorry... Will do that and update the community about it Anyways... the link is: https://github.com/nagarajanchinnasamy/drill.git > 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 > Attachments: 01_session_id_sqlline.png, > 02_session_id_webconsole_query.png, 03_session_id_webconsole_result.png > > > 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)
[jira] [Commented] (DRILL-5043) Function that returns a unique id per session/connection similar to MySQL's CONNECTION_ID()
[ https://issues.apache.org/jira/browse/DRILL-5043?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15684196#comment-15684196 ] Gautam Kumar Parai commented on DRILL-5043: --- Could you please post a link to your GitHub branch which has the code? It would be easier for the community to discuss/review the changes. FYI - Sorry, I do not have the answers to your questions. Let's wait for input from the community. > 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 > Attachments: 01_session_id_sqlline.png, > 02_session_id_webconsole_query.png, 03_session_id_webconsole_result.png > > > 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)
[jira] [Commented] (DRILL-5043) Function that returns a unique id per session/connection similar to MySQL's CONNECTION_ID()
[ https://issues.apache.org/jira/browse/DRILL-5043?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15679161#comment-15679161 ] Nagarajan Chinnasamy commented on DRILL-5043: - Locally, I've implemented a new function session_id as one of the ContextFunctions and it seems to working fine in an embedded mode installation on windows. Following are the changes I made: # I introduced a new function session_id() in ContextFunctions.java that returns its output through BigIntHolder # sessionId is a variable maintained in UserSession.java as per the following and has a getter method: {code} private static final AtomicLong nextSessionId = new AtomicLong(1); private final long sessionId; private UserSession() { queryCount = new AtomicInteger(0); sessionId = nextSessionId.getAndIncrement(); } {code} # ContextInformation.java is modified to introduce sessionId as one of the properties with a getter method. # Utility.createQueryContexInformation is modified to accept sessionId as additional argument to set the sessionId through QueryContextInformation's builder interface. QueryContext.java, TestLocalExchange.java, TestPartitionSender.java, TestFragmentChecker.java are modified to invoke new Utilities.createQueryContextInformation method. # QueryContextInformation.java is modified to set and get sessionId and to serialize sessionId. # BitControl.java and SchemaBitControl.java are modified to include sessionId. I am not sure about one change I made in BitControl.java in the following block: {code} @@ -6934,10 +6934,15 @@ public final class BitControl { case 26: { bitField0_ |= 0x0004; defaultSchemaName_ = input.readBytes(); break; } + case 36: { + bitField0_ |= 0x0008; + sessionId_ = input.readInt64(); + break; + } {code} I am not sure what value I should use in the "case" condition. I have randomly put 36 there Please review the above approach and let me know if I am in right direction. 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)
[jira] [Commented] (DRILL-5043) Function that returns a unique id per session/connection similar to MySQL's CONNECTION_ID()
[ https://issues.apache.org/jira/browse/DRILL-5043?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=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)
[jira] [Commented] (DRILL-5043) Function that returns a unique id per session/connection similar to MySQL's CONNECTION_ID()
[ https://issues.apache.org/jira/browse/DRILL-5043?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15671468#comment-15671468 ] Gautam Kumar Parai commented on DRILL-5043: --- Thanks for creating the JIRA. Please see the following: [1] on how to contribute to Drill. [2] on how to create a custom UDF. [3] on how to pass some param (sessionID in your case) to the UDF. 1. https://drill.apache.org/docs/contribute-to-drill/ 2. https://drill.apache.org/docs/develop-custom-functions/ 3. QueryContext.java. See how session.getDefaultSchemaName() is passed using the QueryContextInformation. > 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 > 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)