druid-io / pydruid

A Python connector for Druid
Other
506 stars 194 forks source link

ThetasketchEstimate not working on Python2.7 #99

Closed dylwylie closed 6 years ago

dylwylie commented 6 years ago

When unit tests are run on Python2.7

TestPostAggregators.test_build_thetapostaggregator fails with

E       AssertionError: assert [{'field': <p...tchEstimate'}] == [{'field': {'f...tchEstimate'}]
E         At index 0 diff: {'field': <pydruid.utils.postaggregator.ThetaSketch instance at 0x1116e9ea8>, 'type': 'thetaSketchEstimate', 'name': 'pag1'} != {'field': {'fieldName': 'theta1', 'type': 'fieldAccess'}, 'type': 'thetaSketchEstimate', 'name': 'pag1'}

It looks like the object is being used in the dictionary rather than the object's post_aggregator. Will drop a PR to fix.

dylwylie commented 6 years ago

Perhaps a separate topic but I noticed the project has a travis.yml but I assume this isn't currently used.

Could we setup Travis to run on changes? Happy to contribute with this if possible with a little guidance.