Skip to content

Conversation

@jedcunningham
Copy link
Member

MySQL doesn't maintain the order of children round trip, so this keeps the deserialized DAGs consistent across db types.

e.g. MySQL:

MySQL [airflow]> create table foo (data json);
Query OK, 0 rows affected (0.026 sec)

MySQL [airflow]> insert into foo values ('{"hello": "world", "ab": "cb"}');
Query OK, 1 row affected (0.003 sec)

MySQL [airflow]> select * from foo;
+--------------------------------+
| data                           |
+--------------------------------+
| {"ab": "cb", "hello": "world"} |
+--------------------------------+
1 row in set (0.000 sec)

and PostgreSQL:

postgres@localhost:postgres> create table foo (data json);
CREATE TABLE
Time: 0.005s
postgres@localhost:postgres> insert into foo values ('{"hello": "world", "ab": "cb"}');
INSERT 0 1
Time: 0.003s
postgres@localhost:postgres> select * from foo;
+--------------------------------+
| data                           |
|--------------------------------|
| {"hello": "world", "ab": "cb"} |
+--------------------------------+
SELECT 1
Time: 0.010s
postgres@localhost:postgres>

MySQL doesn't maintain the order of children round trip, so this keeps
the deserialized DAGs consistent across db types.
@jedcunningham jedcunningham marked this pull request as ready for review March 29, 2025 20:01
Co-authored-by: Tzu-ping Chung <uranusjr@gmail.com>
@jedcunningham jedcunningham requested a review from kaxil March 30, 2025 02:35
@jedcunningham jedcunningham merged commit 78b875f into apache:main Mar 30, 2025
44 checks passed
@jedcunningham jedcunningham deleted the sort_children_deser branch March 30, 2025 20:50
shubham-pyc pushed a commit to shubham-pyc/airflow that referenced this pull request Apr 2, 2025
MySQL doesn't maintain the order of children round trip, so this keeps
the deserialized DAGs consistent across db types.
nailo2c pushed a commit to nailo2c/airflow that referenced this pull request Apr 4, 2025
MySQL doesn't maintain the order of children round trip, so this keeps
the deserialized DAGs consistent across db types.
simonprydden pushed a commit to simonprydden/airflow that referenced this pull request Apr 8, 2025
MySQL doesn't maintain the order of children round trip, so this keeps
the deserialized DAGs consistent across db types.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants