Skip to content

Conversation

@jqnatividad
Copy link
Collaborator

per #2858

cc @kulnor

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds an "xsd_type" column to the moarstats command output that infers the most specific W3C XML Schema datatype based on field type and min/max values. The feature addresses issue #2858 about providing finer-grained inferred data types.

Key changes:

  • Implemented infer_xsd_type() function that maps field types to specific XSD types, with special handling for Integer types based on their min/max range
  • Added "xsd_type" as a new computed column in moarstats output
  • Updated documentation to describe the new column and its behavior

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
src/cmd/moarstats.rs Implements the infer_xsd_type function and integrates it into the moarstats pipeline to compute XSD types for all fields; also fixes a status message to use past tense ("Ran" instead of "Running")
tests/test_moarstats.rs Updates test expectations to include the new "xsd_type" column in the expected output
docs/STATS_DEFINITIONS.md Adds documentation for the new "xsd_type" column explaining its purpose and how it infers types

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@jqnatividad jqnatividad merged commit 2930938 into master Dec 28, 2025
17 checks passed
@jqnatividad jqnatividad deleted the moarstats-xsd-types branch December 28, 2025 03:57
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.

2 participants