cube-js/cube

Mongo Query Not Generating Boolean Value

Open

#1.232 geöffnet am 21. Okt. 2020

Auf GitHub ansehen
 (2 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)Rust (1.965 Forks)batch import
driver:mongodbhelp wanted

Repository-Metriken

Stars
 (19.563 Stars)
PR-Merge-Metriken
 (Durchschn. Merge 5T 16h) (138 gemergte PRs in 30 T)

Beschreibung

Describe the bug I am using the Vue cube.js client and I am using Mongo BI Connector as my datasource.

I have a boolean dimension in one of my cubes, but when I execute a query I get the following SQL generated:

SELECT * FROM `cube` WHERE (`cube.myBoolean` <> 'true'
	OR `cube.myBoolean` IS NULL);

Note how the value it is comparing against is 'true' and not true.

Expected behavior I expect it to generate something like:

SELECT * FROM `cube` WHERE (`cube.myBoolean` <> true
	OR `cube.myBoolean` IS NULL);

Version: 0.21.1

Additional context This is a huge issue for me because my MongoDB has an index on that field, and this causes my index to not work. Is there any temporary workaround I can do until this gets fixed?

Contributor Guide