You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2022/07/26 20:21:09 UTC

[GitHub] [airflow] ephraimbuddy opened a new pull request, #25321: Use simple Json in Dataset & DatasetEvent extra field

ephraimbuddy opened a new pull request, #25321:
URL: https://github.com/apache/airflow/pull/25321

   Replaces ExtendedJson with sqlalchemy_jsonfield type
   
   cc: @dstandish 


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [airflow] dstandish commented on a diff in pull request #25321: Use simple Json in Dataset & DatasetEvent extra field

Posted by GitBox <gi...@apache.org>.
dstandish commented on code in PR #25321:
URL: https://github.com/apache/airflow/pull/25321#discussion_r930395339


##########
airflow/migrations/versions/0114_2_4_0_add_dataset_model.py:
##########
@@ -55,7 +55,7 @@ def _create_dataset_table():
             ),
             nullable=False,
         ),
-        sa.Column('extra', ExtendedJSON, nullable=True),
+        sa.Column('extra', sqlalchemy_jsonfield.JSONField(json=json), nullable=True),

Review Comment:
   no i'm fine with it as is.  but i actually thought i recalled that, when it was ExtendedJSON it ended up storing None as {} anyway.  but maybe i was wrong about that.  



-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [airflow] ephraimbuddy commented on a diff in pull request #25321: Use simple Json in Dataset & DatasetEvent extra field

Posted by GitBox <gi...@apache.org>.
ephraimbuddy commented on code in PR #25321:
URL: https://github.com/apache/airflow/pull/25321#discussion_r930410425


##########
airflow/migrations/versions/0114_2_4_0_add_dataset_model.py:
##########
@@ -55,7 +55,7 @@ def _create_dataset_table():
             ),
             nullable=False,
         ),
-        sa.Column('extra', ExtendedJSON, nullable=True),
+        sa.Column('extra', sqlalchemy_jsonfield.JSONField(json=json), nullable=True),

Review Comment:
   defaulted to empty dict now with not nullable



-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [airflow] ephraimbuddy commented on a diff in pull request #25321: Use simple Json in Dataset & DatasetEvent extra field

Posted by GitBox <gi...@apache.org>.
ephraimbuddy commented on code in PR #25321:
URL: https://github.com/apache/airflow/pull/25321#discussion_r930391709


##########
airflow/migrations/versions/0114_2_4_0_add_dataset_model.py:
##########
@@ -55,7 +55,7 @@ def _create_dataset_table():
             ),
             nullable=False,
         ),
-        sa.Column('extra', ExtendedJSON, nullable=True),
+        sa.Column('extra', sqlalchemy_jsonfield.JSONField(json=json), nullable=True),

Review Comment:
   I think you mean the `{}` in the REST API? That's just because of the JsonObjectField used. It returns `{}` if the value is null and I think it's ok. 
   The field is still nullable at the DB level, just empty dictionary at the REST API. I can work the REST API to return None if it's preferred?



-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [airflow] dstandish commented on a diff in pull request #25321: Use simple Json in Dataset & DatasetEvent extra field

Posted by GitBox <gi...@apache.org>.
dstandish commented on code in PR #25321:
URL: https://github.com/apache/airflow/pull/25321#discussion_r930386821


##########
airflow/migrations/versions/0114_2_4_0_add_dataset_model.py:
##########
@@ -55,7 +55,7 @@ def _create_dataset_table():
             ),
             nullable=False,
         ),
-        sa.Column('extra', ExtendedJSON, nullable=True),
+        sa.Column('extra', sqlalchemy_jsonfield.JSONField(json=json), nullable=True),

Review Comment:
   since it seems the field is alway spopulated, should we just make it non-nullable?



-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [airflow] ephraimbuddy merged pull request #25321: Use simple Json in Dataset & DatasetEvent extra field

Posted by GitBox <gi...@apache.org>.
ephraimbuddy merged PR #25321:
URL: https://github.com/apache/airflow/pull/25321


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org