Open JamesMcMahon opened 10 years ago
Yep, it's totally possible to namespace them; in fact, I thought I had namespaced all the autogenerated code. It requires regenerating the Thrift code.
I've been meaning to change the namespacing to be more logical - let me look at this and cut a new gem in the next day or so.
Thanks for the quick reply. I figured this was more complex than just wrapping the code in a module otherwise I would have sent a pull request.
For a workaround I'll just rename my model temporarily in my project's feature branch until you have the new gem out.
Andy, We are having the same problem with few classes. Did you get a chance to namespace them?
Andy! Why not check in the IDL code so that someone else can fix this? We also need a fix and would happily patch and share, but without the .thrift files, we cannot regenerate the files. Any update on this?
The IDL code is not owned by me or written by me. It's the property of the Hive project, and you can find the IDL files there if you want to take a crack at regenerating the classes. I've been too busy with other things to do this, as regenerating the code is pretty painful (Thrift is hard to install).
I will try to have a look at it today.
I tried yesterday. I did the following :
II would say it's worth someone else trying this to validate my findings.
Another rather generic class name I have problems with it Database
.
The classes defined in
hive_metastore_types.rb
are created directly in the global namespace, not in a specific module and they are prone to class name collisions because of this.For example, in my project my
Role
model is conflicting with theRole
class defined by rbhive. There are other very generic names in this file that could also cause collisions, likeType
andVersion
.Can you put these classes inside a module? Is there any workaround in the meantime?