Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix OperatorInfo decoder when type is partitionedOutputInfo #45

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add missing class PartitionedOutputInfo
Marc-Andre Giroux committed Jul 4, 2018
commit 8d9957f6a086e7b210d2fed61dd65dfca9ee42f2
18 changes: 17 additions & 1 deletion modelgen/model_versions.rb
Original file line number Diff line number Diff line change
@@ -190,7 +190,7 @@ def decode(hash)
end
end

# Inner classes
# Inner classes
module OperatorInfo
def self.decode(hash)
unless hash.is_a?(Hash)
@@ -226,6 +226,22 @@ def decode(hash)
end
end

class << PartitionedOutputInfo =
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Big diff, but this is what was missing.

Base.new(:rows_added, :pages_added, :output_buffer_peak_memory_usage)
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["rowsAdded"],
hash["pagesAdded"],
hash["outputBufferPeakMemoryUsage"]
)
obj
end
end

##
# Those model classes are automatically generated
#