[CALCITE-4379] Meta.Frame created with java float values in rows hits a ClassCastException in toProto()

* Remove unnecessary conversion of Float values to long in
  TypedValue.toProto(...). The subsequently invoked writeToProtoWithType(...)
  method actually expects float values in this case.

* Make a similar fix for Character values.

* Add Frame serialization round-trip unit tests to cover this failure mode.

* Note: a similar problem appears to still exist for Timestamp and Date/Time
  values in this context, but I did not attempt to fix it in this commit because
  there is apparently no use case for putting Timestamp/Date/Time objects into
  Frames. Those values are normally returned as plain numbers in result rows.

Closes #130

Signed-off-by: Josh Elser <elserj@apache.org>
2 files changed
tree: 13d2d3b52edb931f0d5adc0e7ba4069b0ba90dbd
  1. .github/
  2. bom/
  3. core/
  4. docker/
  5. gradle/
  6. metrics/
  7. metrics-dropwizardmetrics/
  8. noop-driver/
  9. release/
  10. server/
  11. shaded/
  12. site/
  13. src/
  14. standalone-server/
  15. tck/
  16. .editorconfig
  17. .gitattributes
  18. .gitignore
  19. .ratignore
  20. .travis.yml
  21. build.gradle.kts
  22. docker-compose.yml
  23. docker.sh
  24. gradle.properties
  25. gradlew
  26. gradlew.bat
  27. LICENSE
  28. NOTICE
  29. README
  30. README.md
  31. settings.gradle.kts
README.md

Build Status CI Status

Apache Calcite -- Avatica

Apache Calcite's Avatica is a framework for building database drivers.

Avatica is a sub-project of Apache Calcite.

For more details, see the home page.

Release notes for all published versions are available on the history page.