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

[JS] Empty table should provide an empty iterator

    XMLWordPrintableJSON

Details

    Description

      When a table is created without any data and an iterator is requested I would expect to get an empty iterator that just returns that it's done.

      Expected result:

      {"value": null, "done": true}
      

      However, the code fails in strideForType() with Uncaught TypeError: type2 is undefined.

      schema = new arrow.Schema(dataType.children)
      data = new arrow.Table(this.schema)
      
      const iter = data[Symbol.iterator]()
      

      It seems that the table just creates a new vector with its data and then the strideForType method fails.

      Attachments

        Issue Links

          Activity

            People

              paul.e.taylor Paul Taylor
              terusus Teodor Kostov
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 20m
                  20m