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

[Rust][DataFusion] Panic trying to select * from a CSV (panicked at 'index out of bounds: the len is 0 but the index is 0)

    XMLWordPrintableJSON

    Details

      Description

      I was trying to write a reproducer for another bug, and I hit this one:

      Repro:

      CREATE EXTERNAL TABLE repro
      STORED AS CSV
      LOCATION 'repro.csv';
      
      select * from repro;
      

      The contents of repro.csv are as follows (also attached):

      a,b
      1,100
      1,200
      2,100
      2,200
      2,300
      

      Expected behavior: a table of 2 columns, 5 rows is returned

      Actual behavior: A panic occurs:

      > select * from repro;
      thread 'main' panicked at 'index out of bounds: the len is 0 but the index is 0', datafusion/src/optimizer/projection_push_down.rs:238:31
      note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
      

      I'll try and look into it myself, but I wanted to get the repro up first.

        Attachments

        1. repro.csv
          0.0 kB
          Andrew Lamb

          Issue Links

            Activity

              People

              • Assignee:
                alamb Andrew Lamb
                Reporter:
                alamb Andrew Lamb
              • 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 - 50m
                  50m