kadubhumika commented on issue #74023: URL: https://github.com/apache/airflow/issues/74023#issuecomment-5932849765
Hi maintainer @ChahatKumar ! I would love to work on this issue. Could you please assign it to me? ### Proposed Approach The root cause is that PostgreSQL's `JSONB` data type automatically normalizes numbers (e.g., converting `1.7E308` into its fully expanded numeric form). When SQLAlchemy or Airflow's internal JSON decoder reads this expanded token back from the database, standard JSON parsers treat it as an arbitrarily large Python `int` instead of a `float`. To resolve this and preserve the original JSON number semantics, I plan to explore: 1. **Custom JSON Deserializer:** Providing a custom `json_deserializer` to the SQLAlchemy engine/dialect configuration that intercepts numeric tokens or handles float/integer casting boundaries cleanly. 2. **Type Decorator / Opaque Storage fallback:** Utilizing a custom SQLAlchemy `TypeDecorator` or evaluating if certain `DagRun` configuration paths should safely fallback to or enforce strict float parsing when retrieving JSONB tokens. 3. **Validation & Documentation:** If a total structural bypass isn't feasible due to JSONB limitations, implementing a validation check during the `DagRun` trigger phase to alert users or cleanly enforce boundaries before it hits the database. I'm ready to dive into the codebase and submit a PR for this. Thanks! -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
