databricks / spark-xml

XML data source for Spark SQL and DataFrames
Apache License 2.0
500 stars 226 forks source link

Support XSD schema complexType with only attributes; with value but no type too (assume string) #559

Closed srowen closed 2 years ago

srowen commented 2 years ago

Pretty much as it says. This supports cases like:

    <xs:complexType name="foo">
        <xs:attribute name="bar" type="bing" use="required"/>
        <xs:attribute name="baz" type="buzz" use="required"/>
    </xs:complexType>

and

    <xs:complexType name="foo">
        <xs:attribute name="bar" fixed="X" use="required"/>
    </xs:complexType>
codecov-commenter commented 2 years ago

Codecov Report

Merging #559 (30919b8) into master (d76a500) will decrease coverage by 0.17%. The diff coverage is 60.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #559      +/-   ##
==========================================
- Coverage   85.66%   85.49%   -0.18%     
==========================================
  Files          18       18              
  Lines         963      965       +2     
  Branches       94       92       -2     
==========================================
  Hits          825      825              
- Misses        138      140       +2     
Impacted Files Coverage Δ
...la/com/databricks/spark/xml/util/XSDToSchema.scala 61.62% <60.00%> (-1.47%) :arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update d76a500...30919b8. Read the comment docs.