Class ContextInformation

java.lang.Object
org.apache.drill.exec.ops.ContextInformation

public class ContextInformation extends Object
Provides query context information (such as query start time, query user, default schema etc.) for UDFs.
  • Constructor Details

  • Method Details

    • getQueryUser

      public String getQueryUser()
      Returns:
      userName of the user who issued the current query.
    • getQueryUserCredentials

      public UserBitShared.UserCredentials getQueryUserCredentials()
      Returns:
      credentials of the user who issued the current query.
    • getCurrentDefaultSchema

      public String 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

      public Instant getQueryStartInstant()
      Returns:
      Query start time as an Instant
    • getRootFragmentTimeZone

      public ZoneId getRootFragmentTimeZone()
      Returns:
      Query time zone as a ZoneId
    • getSessionId

      public String getSessionId()
      Returns:
      Unique id of the user session