Skip to content

Conversation

@nikhilsinhaparseable
Copy link
Contributor

if field defined as float,
below values (examples) can be accepted -
100,-100.45, 100.23, "200.45"

Fixes #639 .

Description


This PR has:

  • been tested to ensure log ingestion and log query works.
  • added comments explaining the "why" and the intent of the code wherever would not be obvious for an unfamiliar reader.
  • added documentation for new or modified features or behaviors.

if field defined as float,
below values (examples) can be accepted -
100,-100.45, 100.23, "200.45"
Copy link
Member

@nitisht nitisht left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@nitisht nitisht merged commit c11641f into parseablehq:main Mar 30, 2024
nikhilsinhaparseable added a commit to nikhilsinhaparseable/parseable that referenced this pull request Apr 20, 2024
if field is defined as float,
below values (examples) can be accepted -
100,-100.45, 100.23, "200.45"
@aleimu
Copy link

aleimu commented Nov 13, 2024

When the Schema Type is Dynamic, after JSON serialization, the float loses precision and becomes an int type value. When storing such a value back into the dynamic database, it causes a type error. How can this issue be resolved?

POST  /api/v1/ingest  HTTP/1.1
HOST   : 192.168.33.10:8002
HEADERS:
        Authorization: Basic 111111=
        Content-Type: application/json
        User-Agent: go-resty/2.15.3 (https://github.com/go-resty/resty)
        X-P-Stream: charge_task_record_test_2
BODY   :
[
   {
      "id": 111,
      "action": "test",
      "user_id": 0,
      "soc": 1,
      "mileage": 123
   }
]

------------------------------------------------------------------------------
~~~ RESPONSE ~~~
STATUS       : 400 Bad Request
PROTO        : HTTP/1.1
RECEIVED AT  : 2024-11-13T10:36:40.978560864+08:00
TIME DURATION: 2.326225ms
HEADERS      :
        Content-Type: text/plain; charset=utf-8
        Date: Wed, 13 Nov 2024 02:36:40 GMT
        Vary: accept-encoding, Origin, Access-Control-Request-Method, Access-Control-Request-Headers
BODY         :
Invalid Request: Could not process this event due to mismatch in datatype
==============================================================================
sock file [/var/qlog_platform.sock] not found, uds log ignored

@nikhilsinhaparseable nikhilsinhaparseable deleted the static-schema-type-cast branch July 12, 2025 08:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Inquiry on Data Type Compatibility and Specification in Ingest API

3 participants