module PrestoLegacy::Client::Models::QueryInfo
Public Class Methods
decode(hash)
click to toggle source
# File lib/presto_legacy/client/models.rb, line 892 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["queryId"], hash["session"] && SessionRepresentation.decode(hash["session"]), hash["state"] && hash["state"].downcase.to_sym, hash["memoryPool"], hash["scheduled"], hash["self"], hash["fieldNames"], hash["query"], hash["queryStats"] && QueryStats.decode(hash["queryStats"]), hash["setSessionProperties"], hash["resetSessionProperties"], hash["startedTransactionId"], hash["clearTransactionId"], hash["updateType"], hash["outputStage"] && StageInfo.decode(hash["outputStage"]), hash["failureInfo"] && FailureInfo.decode(hash["failureInfo"]), hash["errorCode"] && ErrorCode.decode(hash["errorCode"]), hash["inputs"] && hash["inputs"].map {|h| Input.decode(h) }, ) obj end