module Trino::Client::ModelVersions::V0_205::OperatorInfo

Inner classes

Public Class Methods

decode(hash) click to toggle source
# File lib/trino/client/model_versions/0.205.rb, line 212
def self.decode(hash)
  unless hash.is_a?(Hash)
    raise TypeError, "Can't convert #{hash.class} to Hash"
  end
  model_class = case hash["@type"]
    when "exchangeClientStatus"   then ExchangeClientStatus
    when "localExchangeBuffer"    then LocalExchangeBufferInfo
    when "tableFinish"            then TableFinishInfo
    when "splitOperator"          then SplitOperatorInfo
    when "hashCollisionsInfo"     then HashCollisionsInfo
    when "partitionedOutput"      then PartitionedOutputInfo
    when "joinOperatorInfo"       then JoinOperatorInfo
    when "windowInfo"             then WindowInfo
    when "tableWriter"            then TableWriterInfo
  end
  if model_class
     model_class.decode(hash)
  end
end