Class OnlineQueryResult

java.lang.Object
ai.chalk.models.OnlineQueryResult
All Implemented Interfaces:
AutoCloseable

public class OnlineQueryResult extends Object implements AutoCloseable
OnlineQueryResult holds the result of an online query.
  • Constructor Details

    • OnlineQueryResult

      public OnlineQueryResult(org.apache.arrow.vector.table.Table scalarsTable, Map<String,org.apache.arrow.vector.table.Table> groupsTables, ServerError[] errors, QueryMeta meta, org.apache.arrow.memory.BufferAllocator allocator)
  • Method Details

    • close

      public void close()
      close releases resources associated with the result.
      Specified by:
      close in interface AutoCloseable
    • unmarshal

      public <T extends FeaturesClass> T[] unmarshal(Class<T> clazz) throws ClientException
      Throws:
      ClientException
    • getScalarsTable

      public org.apache.arrow.vector.table.Table getScalarsTable()
      scalarsTable is an Arrow Table containing scalar features of the target feature class. For example, if the target feature class "User" has the attributes "email" and "name", then the scalarsTable will contain these two columns. Each row in the table corresponds to a single User in the query.
    • getGroupsTables

      public Map<String,org.apache.arrow.vector.table.Table> getGroupsTables()
      groupsTables is a map from a has-many feature to its corresponding Arrow Table. For example, if the target feature class "User" has an attribute "transactions" which is a has-many feature, then all transactions associated with any of the Users in the query will be returned in the groupsTables map, under the key "user.transactions".
    • getErrors

      public ServerError[] getErrors()
      errors is a list of errors that occurred in the server during the query.
    • getMeta

      public QueryMeta getMeta()
      meta contains execution metadata for the query. See QueryMeta for details.
    • getAllocator

      public org.apache.arrow.memory.BufferAllocator getAllocator()
      allocator associated with the arrow objects in the result. Needs to be closed when the result is no longer needed.
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • canEqual

      protected boolean canEqual(Object other)
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object