-
Notifications
You must be signed in to change notification settings - Fork 552
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
Inserting NULL values into Hive #55
Comments
I just found a simple fix to this issue: def escape_item(self, item):
if isinstance(item, (int, float)):
return self.escape_number(item)
elif isinstance(item, basestring):
return self.escape_string(item)
elif item is None:
return 'NULL'
else:
raise exc.ProgrammingError("Unsupported object {}".format(item))
import pyhive
pyhive.common.ParamEscaper.escape_item = escape_item Please let me know if this would be an acceptable fix and I can contribute a pull request. Thanks, |
Thanks for the report! This is fixed. |
fbertsch
pushed a commit
to fbertsch/PyHive
that referenced
this issue
Oct 21, 2016
Closes dropbox#55
This was referenced Jul 2, 2020
Closed
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi, thanks for making this software available to all. I am reaching out to see if I can get help with an issue I am having. I am trying to upload a pandas dataframe to Hive, but I run into a problem when the dataframe has
None
values.The code above results in the following error:
Any help would be greatly appreciated. Thanks!
The text was updated successfully, but these errors were encountered: