cube-js/cube

`chartPivot` and `tablePivot` methods of `ResultSet` don't throw error for un-decomposed datasets of `compareDateRange` type queries

Open

#8050 aperta il 28 mar 2024

Vedi su GitHub
 (2 commenti) (0 reazioni) (0 assegnatari)Rust (1965 fork)batch import
client:coregood first issuehelp wanted

Metriche repository

Star
 (19.563 star)
Metriche merge PR
 (Merge medio 5g 16h) (138 PR mergiate in 30 g)

Descrizione

Describe the bug If you run a compareDateRange query, you will get a result set that needs to be "decomposed" first using the decompose method of the client library. Calling the rawData method on it would correctly emit this error:

Error: Method is not supported for a 'compareDateRangeQuery' query type. Please use decompose

However, calling tablePivot and chartPivot would not emit any errors—which is quite confusing for someone who doesn't know about decompose and quirks of compareDateRange.

Expected behavior Calling tablePivot and chartPivot on compareDateRange result set should emit the same error as shown above.

Version: 0.35.4

Guida contributor