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

[Python] pa.union() mode argument unintuitive

    XMLWordPrintableJSON

Details

    Description

      >>> pa.union([pa.field('x', pa.int16())], 'sparse')
      UnionType(union[dense]<x: int16=0>)
      >>> pa.union([pa.field('x', pa.int16())], 'dense')
      UnionType(union[dense]<x: int16=0>)
      >>> pa.union([pa.field('x', pa.int16())], 42)
      UnionType(union[dense]<x: int16=0>)
      

      I would suggest allowing "sparse" and "dense" strings as aliases to the internal enum values, and disallowing everything else.

      Attachments

        Issue Links

          Activity

            People

              apitrou Antoine Pitrou
              apitrou Antoine Pitrou
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: