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

[Rust][DataFusion] SELECT <expression> with no FROM clause should produce a single row of output

    XMLWordPrintableJSON

Details

    Description

      This is somewhat of a special case, but it is useful for demonstration / testing expressions.

      A select expression with no where clause, such as "select 1" should produce a single row. Today datafusion accepts the query but produces no rows.

      Actual output:

      arrow/rust$ cargo run --release  --bin datafusion-cli 
          Finished release [optimized] target(s) in 0.25s
           Running `target/release/datafusion-cli`
      > select 1 ;
      0 rows in set. Query took 0 seconds.
      

      Expected output is a single row, with the value 1. Here is an example using SQLLite :

      $ sqlite3 
      SQLite version 3.28.0 2019-04-15 14:49:49
      Enter ".help" for usage hints.
      Connected to a transient in-memory database.
      Use ".open FILENAME" to reopen on a persistent database.
      sqlite> select 1;
      1
      sqlite> 
      

      Attachments

        Issue Links

          Activity

            People

              Ruihang Xia Ruihang Xia
              alamb Andrew Lamb
              Votes:
              0 Vote for this issue
              Watchers:
              3 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 - 1.5h
                  1.5h