Generate definition pvs for stat vars - #602
Conversation
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | 16 |
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.
There was a problem hiding this comment.
Code Review
This pull request introduces automatic definition generation for StatisticalVariable nodes in GraphTransformer.java by extracting relevant properties (such as measurement denominator, qualifier, stat type, measured property, population type, and constraints) and formatting them into a comma-separated string. It also adds a helper utility getFirstPropertyValue in McfUtil.java and updates corresponding unit tests. The review feedback suggests several improvements: utilizing existing vocabulary constants instead of hardcoded string literals, ensuring the newly generated definition property is excluded from being classified as a constraint property, and broadening the parameter type in McfUtil.getFirstPropertyValue to PropertyValuesOrBuilder for better flexibility.
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request introduces automatic generation of definitions for Statistical Variables within the MCF mutation process. It updates McfMutator to construct a definition string based on properties like measurement denominator, qualifier, stat type, measured property, population type, and constraints, and adds corresponding test coverage. Additionally, several new vocabulary constants are registered. Feedback suggests refactoring generateSVDefinition in McfUtil to accept PropertyValuesOrBuilder for better flexibility and to sort constraint keys internally to guarantee deterministic output regardless of the map implementation passed by the caller.
Definitions are a serialization of the important pvs for a stat var
These were previously generated in prophet and are required for NL search. Currently backfilled in spanner, but should be added to ingestion