You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ossie.apache.org by "LiangRuoShui (via GitHub)" <gi...@apache.org> on 2026/08/05 09:50:39 UTC

[PR] Validate relationship column pair counts [ossie]

LiangRuoShui opened a new pull request, #307:
URL: https://github.com/apache/ossie/pull/307

   ## Why
   
   The OSI spec requires `from_columns` and `to_columns` in a relationship to have the same number of columns so each source column maps to one target column. The validator checked that relationship datasets existed, but did not enforce this cardinality rule, so invalid relationship definitions could pass validation and be silently truncated by downstream converters that zip the two arrays.
   
   ## What changed
   
   - Added a relationship-level validation check in `validation/validate.py` for mismatched `from_columns` / `to_columns` lengths.
   - Report mismatches with a clear `[Relationship]` error that includes the relationship name, model name, and both column counts.
   - Added validation unit tests for both mismatched and matching relationship column arrays.
   
   ## Tests added/updated
   
   - `validation/tests/test_validate.py::test_validate_references_rejects_mismatched_relationship_column_counts`
   - `validation/tests/test_validate.py::test_validate_references_accepts_matching_relationship_column_counts`
   
   ## Verification
   
   - `uv run --with pytest --with pyyaml --with jsonschema --with sqlglot pytest validation/tests/test_validate.py -q`
   - `uv run validation/validate.py examples/tpcds_semantic_model.yaml`
   - Verified an invalid temporary OSI document now fails validation with `2 from_columns but 1 to_columns`.
   


-- 
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: issues-unsubscribe@ossie.apache.org

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


Re: [PR] Validate relationship column pair counts [ossie]

Posted by "LiangRuoShui (via GitHub)" <gi...@apache.org>.
LiangRuoShui closed pull request #307: Validate relationship column pair counts
URL: https://github.com/apache/ossie/pull/307


-- 
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: issues-unsubscribe@ossie.apache.org

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


Re: [PR] Validate relationship column pair counts [ossie]

Posted by "LiangRuoShui (via GitHub)" <gi...@apache.org>.
LiangRuoShui commented on PR #307:
URL: https://github.com/apache/ossie/pull/307#issuecomment-5678111652

   Closing this PR for now. Thank you for the time and review.


-- 
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: issues-unsubscribe@ossie.apache.org

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