Skip to content

Multi-dimensional COLUMN handling #3

@mcdittmar

Description

@mcdittmar

Need to check the response for a column whose value has multiplicity > 1 (ie: an array).
See test_reader.py::test_parsing_columns()

  • MultiObj.b is an array element of type ivoa:real[2]
    o for CONSTANT and LITERAL, this results in 'list of float', [ r1, r2 ]
    o for COLUMN, this results in 'list of length 1 of MaskedColumn'

  • MultiObj.a (scalar)
    o LITERAL - float n/a v1
    o CONSTANT - float n/a v1
    o COLUMN - MaskedColumn(float) shape(2,) [r1v1, r2v1]

  • MultiObj.b (array)
    o LITERAL - list(float) len=2 [v1, v2]
    o CONSTANT - list(float) len=2 [v1, v2]
    o COLUMN - list(MaskedColumn(float)) len=1 <<< This doesn't look right
    list[0] = MaskedColumn shape(2,2) [[r1v1, r1v2],[r2v1, r2v2]]

  • Handled by: framework.VodmlDescriptor::select_return_value()
    o this is the base class for Attribute, Reference, Composition
    o current logic looks OK for Reference and Composition, but not Attribute
    o probably want override in Attribute
    Composition max = -1 for unbound (so if not making override, take into account)

def test_parsing_columns( columns_file ):
"""
Test parsing of COLUMN elements
<COLUMN dmtype ref >
<OPTIONMAPPING>
<OPTION>"string"</OPTION>
<ENUMLITERAL>"vodml-id"</ENUMLITERAL> or <SEMANTICCONCEPT>
</OPTIONMAPPING>
</COLUMN>
The parser pushes the Table rows into value arrays

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions