Uploaded image for project: 'Apache Arrow'
  1. Apache Arrow
  2. ARROW-612

[Java] Field toString should show nullable flag status

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Trivial
    • Resolution: Fixed
    • None
    • 0.3.0
    • Java
    • None

    Description

      Often when comparing Schemas, I'll see an error message like below because of differing schemas. The only difference is one is nullable and one is not, but that info is not printed in the Field.toString method.

       - numeric type conversion *** FAILED *** (118 milliseconds)
      [info]   java.lang.IllegalArgumentException: Different schemas:
      [info] Schema<i: Int(32, true)>
      [info] Schema<i: Int(32, true)>
      [info]   at org.apache.arrow.vector.util.Validator.compareSchemas(Validator.java:43)
      

      I would be nice to match the C++ Field.toString that prints " not null " only if the nullable flag is not set. Which would then look like this

      [info] Schema<i: Int(32, true) not null>
      [info] Schema<i: Int(32, true)>
      

      Attachments

        Activity

          People

            bryanc Bryan Cutler
            bryanc Bryan Cutler
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: