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

implement entity id attr pick-up mech and fix #31 #33

Merged
merged 4 commits into from Jun 8, 2021

Conversation

subbyte
Copy link
Member

@subbyte subbyte commented Jun 5, 2021

The PR fully addresses #31 and partially addresses #32.

  1. implement a new function get_entity_id_attribute() in src/kestrel/codegen/relations.py to compute the appropriate attribute used as identifier attribute for entities.
  2. update src/kestrel/codegen/commands.py to use get_entity_id_attribute().
  3. replace the or_pattern() for post-prefetch merge in src/kestrel/codegen/commands.py with firepit.merge() (partially address codegen upgrade: use firepit to merge variables #32).
  4. update get_variable_entity_count() in src/kestrel/codegen/summary.py to use get_entity_id_attribute().
  5. update _get_variable_query_ids() in src/kestrel/codegen/summary.py since merged variable in firepit do not have __membership records.
  6. update gen_variable_summary() in src/kestrel/codegen/summary.py to only give cached records when there is a data source query.

@subbyte subbyte requested a review from pcoccoli June 5, 2021 02:08
@CLAassistant
Copy link

CLAassistant commented Jun 5, 2021

CLA assistant check
All committers have signed the CLA.

Copy link
Collaborator

@pcoccoli pcoccoli left a comment

Choose a reason for hiding this comment

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

Looks OK, though ideally we should be able to use multiple attributes for object identity (e.g. for a process, use both pid and name).

@subbyte
Copy link
Member Author

subbyte commented Jun 8, 2021

Looks OK, though ideally we should be able to use multiple attributes for object identity (e.g. for a process, use both pid and name).

Good point to make the function get_entity_id_attribute() more comprehensive regarding logic in the future.

@subbyte subbyte merged commit 4a0373f into develop Jun 8, 2021
@subbyte subbyte deleted the hotfix-31-process-pid branch June 8, 2021 13:09
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.

None yet

3 participants