tableau / connector-plugin-sdk

SDK for Developing Tableau Connector Plugins
https://tableau.github.io/connector-plugin-sdk/
MIT License
105 stars 107 forks source link

[BUG] SPACE(int2) could not catch invalid result when connector returns `space(0) = null` #1211

Closed xsgao-github closed 6 months ago

xsgao-github commented 6 months ago

Describe the bug We noticed a bug that our custom connector (Starburst Enterprise by Starburst) does not return correct value for formula space(0). Instead of empty string (''), it returns null.

However, tdvt test suite could not capture this error.

In test case SPACE(int2), there is a expected value <value>&quot;&quot;</value>. But tdvt did not error out when our connector never returned an empty string.

Furthermore, I think only checking the formula output without corresponding input is a bad idea. Instead of checking SPACE(int2) only, we should check int2, SPACE(int2).

Screenshots The screenshot below shows that our connector did not convert the space(param) correctly and still passed the test.

image

Desktop (please complete the following information):

About you: Name: Song Gao Company: Starburst Data

lukewrites commented 6 months ago

W-14762984

rosswbrown commented 6 months ago

Thanks for raising this issue. The existing string.space tests do have some ambiguity regarding correctness. Based on your suggestion we've added an explicit string.space.empty test case that should catch this issue in the future.