module Trino::Client::ModelVersions::V316::ExecutionFailureInfo
Public Class Methods
decode(hash)
click to toggle source
# File lib/trino/client/model_versions/316.rb, line 809 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["type"], hash["message"], hash["cause"] && ExecutionFailureInfo.decode(hash["cause"]), hash["suppressed"] && hash["suppressed"].map {|h| ExecutionFailureInfo.decode(h) }, hash["stack"], hash["errorLocation"] && ErrorLocation.decode(hash["errorLocation"]), hash["errorCode"] && ErrorCode.decode(hash["errorCode"]), hash["semanticErrorCode"] && hash["semanticErrorCode"].downcase.to_sym, hash["remoteHost"], ) obj end