cube icon indicating copy to clipboard operation
cube copied to clipboard

SAP HANA Driver implemented

Open zhjuncai opened this issue 3 years ago • 12 comments

Check List

  • [X] Tests has been run in packages where changes made if available
  • [X] Linter has been run for changed code
  • [X] Tests for the changes have been added if not covered yet
  • [x] Docs have been added / updated if required

Issue Reference this PR resolves This is the initial driver implementation for SAP HANA, so no issue was resolved

Description of Changes Made (if issue reference is not provided) SAP HANA is quite heavy database thus can't create a docker container to run test cases against it. I verified all the test on a remote HANA box. see the results

Latest Test results Screenshot 2022-12-07 at 14 13 02

zhjuncai avatar Nov 17 '22 10:11 zhjuncai

@ovr may I ask who will review my PR?

zhjuncai avatar Nov 18 '22 01:11 zhjuncai

Codecov Report

Base: 82.42% // Head: 40.81% // Decreases project coverage by -41.60% :warning:

Coverage data is based on head (744970a) compared to base (028895d). Patch coverage: 11.29% of modified lines in pull request are covered.

:exclamation: Current head 744970a differs from pull request most recent head 6e4943e. Consider uploading reports for the commit 6e4943e to get more accurate results

Additional details and impacted files
@@             Coverage Diff             @@
##           master    #5648       +/-   ##
===========================================
- Coverage   82.42%   40.81%   -41.61%     
===========================================
  Files         139      150       +11     
  Lines       19621    19533       -88     
  Branches        0     5068     +5068     
===========================================
- Hits        16172     7973     -8199     
- Misses       3449    10736     +7287     
- Partials        0      824      +824     
Flag Coverage Δ
cube-backend 40.81% <11.29%> (?)
cubesql ?

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
.../cubejs-server-core/src/core/DriverDependencies.js 100.00% <ø> (ø)
...es/cubejs-schema-compiler/src/adapter/HanaQuery.js 9.83% <9.83%> (ø)
...cubejs-schema-compiler/src/adapter/QueryBuilder.js 71.42% <100.00%> (ø)
rust/cubesql/cubesql/src/compile/builder.rs
...gine/information_schema/postgres/character_sets.rs
...l/src/sql/database_variables/mysql/session_vars.rs
...nt/src/models/v1_load_request_query_filter_base.rs
...pile/engine/information_schema/postgres/pg_type.rs
...besql/cubesql/src/compile/rewrite/rules/members.rs
...le/engine/information_schema/postgres/pg_depend.rs
... and 281 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

codecov[bot] avatar Nov 18 '22 08:11 codecov[bot]

Hey @zhjuncai ! Thanks for contributing to this one! Could you please also add at least a smoke E2E test? You can find an example here: https://github.com/cube-js/cube.js/blob/master/packages/cubejs-testing/test/smoke-materialize.test.ts.

paveltiunov avatar Nov 29 '22 04:11 paveltiunov

Hey @zhjuncai ! Thanks for contributing to this one! Could you please also add at least a smoke E2E test? You can find an example here: https://github.com/cube-js/cube.js/blob/master/packages/cubejs-testing/test/smoke-materialize.test.ts.

Thanks @paveltiunov I will try my best to add a smoke E2E test.

zhjuncai avatar Nov 30 '22 04:11 zhjuncai

Hello @paveltiunov I tried to add smoke test for hana driver, but it's not working as it still require test docker container for HANA. could you please review the driver first, once it's reviewed and merged. I will continue to smoke testing...

zhjuncai avatar Dec 07 '22 06:12 zhjuncai

@paveltiunov could you help to review?

zhjuncai avatar Dec 13 '22 02:12 zhjuncai

@zhjuncai Do you mean there's no docker image of SAP HANA available?

paveltiunov avatar Dec 22 '22 05:12 paveltiunov

@zhjuncai You might want to update https://www.npmjs.com/package/cubejs-hana-driver README as we published backlink here https://cube.dev/docs/config/databases#third-party-community-drivers. Please see https://github.com/cube-js/cube.js/blob/master/CONTRIBUTING.md#contributing-database-drivers for more info.

paveltiunov avatar Dec 29 '22 02:12 paveltiunov

There is no supported docker image for HANA for now, Hana-express docker image is deprecated, meanwhile Hana express also requires lots of memory to run. I don't want to run the deprecated image and drain your pipeline. > @zhjuncai Do you mean there's no docker image of SAP HANA available?

zhjuncai avatar Jan 01 '23 14:01 zhjuncai

I will update it soon. > @zhjuncai You might want to update https://www.npmjs.com/package/cubejs-hana-driver README as we published backlink here https://cube.dev/docs/config/databases#third-party-community-drivers. Please see https://github.com/cube-js/cube.js/blob/master/CONTRIBUTING.md#contributing-database-drivers for more info.

zhjuncai avatar Jan 01 '23 14:01 zhjuncai

I've updated the README, please start review process...

zhjuncai avatar Jan 11 '23 03:01 zhjuncai

Screenshot 2025-06-09 at 17 22 46

It would be great to see a more substantial usage of this driver before it gets added to the distribution of Cube Core.

igorlukanin avatar Jun 09 '25 15:06 igorlukanin