Class: Trino::Client::ModelVersions::V316::StatsAndCosts=Base.new(:stats,:costs)
- Inherits:
-
Object
- Object
- Trino::Client::ModelVersions::V316::StatsAndCosts=Base.new(:stats,:costs)
- Defined in:
- lib/trino/client/model_versions/316.rb
Class Method Summary collapse
Class Method Details
.decode(hash) ⇒ Object
2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 |
# File 'lib/trino/client/model_versions/316.rb', line 2154 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["stats"] && Hash[hash["stats"].to_a.map! {|k,v| [k, PlanNodeStatsEstimate.decode(v)] }], hash["costs"] && Hash[hash["costs"].to_a.map! {|k,v| [k, PlanCostEstimate.decode(v)] }], ) obj end |