[SP-1637] - backport for PDI-13102

fix and test
test is provided in form of integration test
corresponding PR for master: https://github.com/pentaho/big-data-plugin/pull/274

@mattyb149 @hudak @brosander @mattcasters would you mind to review/merge