module Trino::Client::ModelVersions::V316::StageStats
Public Class Methods
decode(hash)
click to toggle source
# File lib/trino/client/model_versions/316.rb, line 2026 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["schedulingComplete"], hash["getSplitDistribution"] && DistributionSnapshot.decode(hash["getSplitDistribution"]), hash["totalTasks"], hash["runningTasks"], hash["completedTasks"], hash["totalDrivers"], hash["queuedDrivers"], hash["runningDrivers"], hash["blockedDrivers"], hash["completedDrivers"], hash["cumulativeUserMemory"], hash["userMemoryReservation"], hash["revocableMemoryReservation"], hash["totalMemoryReservation"], hash["peakUserMemoryReservation"], hash["peakRevocableMemoryReservation"], hash["totalScheduledTime"], hash["totalCpuTime"], hash["totalBlockedTime"], hash["fullyBlocked"], hash["blockedReasons"] && hash["blockedReasons"].map {|h| h.downcase.to_sym }, hash["physicalInputDataSize"], hash["physicalInputPositions"], hash["internalNetworkInputDataSize"], hash["internalNetworkInputPositions"], hash["rawInputDataSize"], hash["rawInputPositions"], hash["processedInputDataSize"], hash["processedInputPositions"], hash["bufferedDataSize"], hash["outputDataSize"], hash["outputPositions"], hash["physicalWrittenDataSize"], hash["gcInfo"] && StageGcStatistics.decode(hash["gcInfo"]), hash["operatorSummaries"] && hash["operatorSummaries"].map {|h| OperatorStats.decode(h) }, ) obj end