pgollangi / FireQL

Interactive CLI and Go library to query Google Firestore database using SQL syntax.
https://pgollangi.github.io/FireQL/
MIT License
31 stars 1 forks source link

"Internal Server Error" If the first doc in collection has a number field with a 0 decimal value (integer) #22

Open Voxar opened 8 months ago

Voxar commented 8 months ago

Describe the bug Trying out Grafana and I get error when trying the queries with the grafana firebase plugin.

Figured out that it only happens when a number field in the first document in the collection contains an integer but any other document contains decimals.

internal server error (Trace ID: 1a0337d32504d4ba2a14299ab0a6492d)

To Reproduce Steps to reproduce the behavior:

  1. Go to firestore and create a new test_collection
  2. Add a document with a number field and set an integer value
  3. Add a document with a number field and set a value with a decimal (float/double)
  4. select * from test_collection

Expected behavior Should reevaluate its choice of type from int to float or double. Or add type specifier to the syntax ("select temp: float from temperatures")

Screenshots If applicable, add screenshots to help explain your problem.

Voxar commented 8 months ago

It actually gives the same error of you put a decimal number in the first document and an integer in the second as well.