mongrov / timon

Efficient local storage and Amazon S3-compatible data synchronization for time-series data,leveraging Parquet for storage and DataFusion for querying, all wrapped in a simple and intuitive API
Other
0 stars 0 forks source link

Incorrect Storage of Integer Values in Schema Fields Defined as int #18

Closed RoshanNepal3 closed 1 day ago

RoshanNepal3 commented 2 days ago

When certain fields in the schema are defined as int|float and others as int only, an issue occurs where values inserted into fields defined strictly as int are incorrectly stored as 0.

For example, consider the following schema for activitydetails:

{
  "date": {
    "type": "string",
    "required": true,
    "unique": true
  },
  "distance": {
    "type": "int|float"
  },
  "step": {
    "type": "int|float"
  },
  "calories": {
    "type": "int|float"
  },
  "arraySteps": {
    "type": "array"
  }
}

If step is set to accept only int values, trying to update the field with a value like 39 results in it being recorded and retrieved as 0 instead.

AhmedBoutaraa57 commented 1 day ago

I tried different things but couldn't reproduce! I need more input about this one

RoshanNepal3 commented 1 day ago

Seems like the issue was from the app's side. Closing it for now.