module Presto::Client::ModelVersions::V0_178::OperatorInfo

Inner classes

Public Class Methods

decode(hash) click to toggle source
# File lib/presto/client/model_versions/0.178.rb, line 195
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
  end
  if model_class
     model_class.decode(hash)
  end
end