module Presto::Client::ModelVersions::V0_205::DriverStats
Public Class Methods
decode(hash)
click to toggle source
# File lib/presto/client/model_versions/0.205.rb, line 531 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["lifespan"] && Lifespan.new(hash["lifespan"]), hash["createTime"], hash["startTime"], hash["endTime"], hash["queuedTime"], hash["elapsedTime"], hash["userMemoryReservation"], hash["revocableMemoryReservation"], hash["systemMemoryReservation"], hash["totalScheduledTime"], hash["totalCpuTime"], hash["totalUserTime"], hash["totalBlockedTime"], hash["fullyBlocked"], hash["blockedReasons"] && hash["blockedReasons"].map {|h| h.downcase.to_sym }, hash["rawInputDataSize"], hash["rawInputPositions"], hash["rawInputReadTime"], hash["processedInputDataSize"], hash["processedInputPositions"], hash["outputDataSize"], hash["outputPositions"], hash["physicalWrittenDataSize"], hash["operatorStats"] && hash["operatorStats"].map {|h| OperatorStats.decode(h) }, ) obj end