Repository navigation
Conversation
There was a problem hiding this comment.
Code Review
This pull request updates SDMX query preparation to fetch both observationProperties and typeOf predicates in a single database call, adds validation to ensure requested variables exist (returning a NotFound error if they do not), and refactors hardcoded predicate strings to use constants. The review feedback highlights that fetching both predicates increases the number of expected edges per variable. The current page size multiplier of 4 (maxObservationPropertyEntitySlots + 1) might cause silent truncation of edges during large batch queries, potentially missing properties or failing to detect unsupported metadata. It is recommended to update the observationPropertiesPageSize helper function to use a multiplier of 5 (maxObservationPropertyEntitySlots + 2) to safely accommodate the additional typeOf edge.
|
/gemini review |
a715dd6 to
5cff76f
Compare
There was a problem hiding this comment.
Code Review
This pull request updates the SDMX shape preparation to fetch both observationProperties and typeOf predicates, and introduces a check to return a NotFound error if a requested variableMeasured does not exist. It also updates the page size calculation and corresponding unit tests to reflect these changes. I have no feedback to provide.
5cff76f to
a63aee2
Compare
Summary
This PR adds an explicit node existence check for
variableMeasuredin SDMX Data and Availability queries.Previously, when an SDMX query requested a non-existent or misspelled
variableMeasured,prepareSdmxShape()received 0observationPropertiesedges and silently defaulted the shape to[observationAbout]. Subsequent entity filters (likec[sex]=Femaleorc[country]=country/ARE) evaluated against[observationAbout]failed with a misleading error:unsupported SDMX component filter "sex"; filterable components are [observationAbout, ...]when it should just say that the variable didn't exist.Changes