Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changing the SPARK encoding of empty non-primitive elements in HAPI objects #1876

Merged
merged 1 commit into from
May 16, 2024

Conversation

piotrszul
Copy link
Collaborator

Changing the SPARK encoding of empty non-primitive elements in HAPI objects to produce NULL values rather than empty structs/arrays.

For example the encoding of:

"identifier" : [
  {
    "use" : "official",
    "system" : "https://github.com/synthetichealth/synthea",
    "value" : "d2120f2d-bc32-096d-d854-1a1e73a05f0d"
  }
],

produce the row:

Row(identifier=[Row(id=None, use='official', type=None, system='
[https://github.com/synthetichealth/synthea'](https://github.com/synthetichealth/synthea%27)
, value='e4fc9c8b-66b7-7f4b-a033-39acfc7633fa', period=None, assigner=None)])

where composite elements such aas period or assigner as set to NULL (None).

The same also applies to empty elements with many cardinality. They produce NULL rather then an empty array().

@piotrszul piotrszul self-assigned this May 2, 2024
@piotrszul piotrszul added this to the v7.0.0 milestone May 2, 2024
@piotrszul piotrszul requested a review from johngrimes May 2, 2024 06:59
…bjects to produce NULL values rather than empty structs/arrays.
@piotrszul piotrszul added encoders Relating to the encoders optimisation Improvement to the performance or efficiency of existing functionality labels May 13, 2024
Copy link
Member

@johngrimes johngrimes left a comment

Choose a reason for hiding this comment

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

Looks good to me!

@johngrimes johngrimes merged commit c6b06e7 into release/7.0.0 May 16, 2024
19 checks passed
@johngrimes johngrimes deleted the _null_encoding branch May 16, 2024 06:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
encoders Relating to the encoders optimisation Improvement to the performance or efficiency of existing functionality
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

None yet

2 participants