module Trino::Client::ModelVersions::V0_149::OperatorStats

Public Class Methods

decode(hash) click to toggle source
# File lib/trino/client/model_versions/0.149.rb, line 796
def decode(hash)
  unless hash.is_a?(Hash)
    raise TypeError, "Can't convert #{hash.class} to Hash"
  end
  obj = allocate
  obj.send(:initialize_struct,
    hash["operatorId"],
    hash["planNodeId"],
    hash["operatorType"],
    hash["addInputCalls"],
    hash["addInputWall"],
    hash["addInputCpu"],
    hash["addInputUser"],
    hash["inputDataSize"],
    hash["inputPositions"],
    hash["getOutputCalls"],
    hash["getOutputWall"],
    hash["getOutputCpu"],
    hash["getOutputUser"],
    hash["outputDataSize"],
    hash["outputPositions"],
    hash["blockedWall"],
    hash["finishCalls"],
    hash["finishWall"],
    hash["finishCpu"],
    hash["finishUser"],
    hash["memoryReservation"],
    hash["systemMemoryReservation"],
    hash["blockedReason"] && hash["blockedReason"].downcase.to_sym,
    hash["info"],
  )
  obj
end