Beeswax and HS2 results sets have some differences in precision:
- HS2 rounds to microsecond precision, while Beeswax returns nanosec
- only differs in EE tests, impala-shell returns timestamps the same way for both protocols
- the cause is that impyla (and dpapi in general) converts timestamps to datetime.datetime by default, which has only microsec precision
- HS2 rounds to less digits
- differs both in EE tests and impala-shell
- the cause is that by default Python formats strings with less precision than the stringstream we use in c++
- there is no clear good way to format a double, string<->double conversions are inherently lossy
- probably there is a standard way to do this in SQL, but I don't know about it
This difference is handled in .test files with the DBAPI_RESULTS, which lets us specify different outputs for the protocols.
I think that it would be better to remove DBAPI_RESULTS and simply format these types in HS2 to match with the beeswax output. The default conversions can be tested in impyla, while the EE tests should focus on Impala and use the maximum precision possible.