Package org.apache.drill.exec.ops
Class ContextInformation
java.lang.Object
org.apache.drill.exec.ops.ContextInformation
Provides query context information (such as query start time, query user, default schema etc.) for UDFs.
-
Constructor Summary
ConstructorDescriptionContextInformation
(UserBitShared.UserCredentials userCredentials, BitControl.QueryContextInformation queryContextInfo) -
Method Summary
Modifier and TypeMethodDescriptionlong
-
Constructor Details
-
Method Details
-
getQueryUser
- Returns:
- userName of the user who issued the current query.
-
getQueryUserCredentials
- Returns:
- credentials of the user who issued the current query.
-
getCurrentDefaultSchema
- Returns:
- Get the current default schema in user session at the time of this particular query submission.
-
getQueryStartTime
public long getQueryStartTime()- Returns:
- Query start time in Unix time (ms)
-
getQueryStartInstant
- Returns:
- Query start time as an Instant
-
getRootFragmentTimeZone
- Returns:
- Query time zone as a ZoneId
-
getSessionId
- Returns:
- Unique id of the user session
-