Jimexist edited a comment on pull request #289:
URL: https://github.com/apache/arrow-datafusion/pull/289#issuecomment-835337364


   ```
   ❯ echo 'select 1 num, 1 + 2 arith, cos(0.5) cos;' | cargo run --release 
--bin datafusion-cli -q
   +-----+-------+--------------------+
   | num | arith | cos                |
   +-----+-------+--------------------+
   | 1   | 3     | 0.8775825618903728 |
   +-----+-------+--------------------+
   1 rows in set. Query took 0 seconds.
   
   ```
   
   ```
   ❯ echo 'select 1 num, 1 + 2 arith, cos(0.5) cos;' | cargo run --release 
--bin datafusion-cli -q -- --format table
   +-----+-------+--------------------+
   | num | arith | cos                |
   +-----+-------+--------------------+
   | 1   | 3     | 0.8775825618903728 |
   +-----+-------+--------------------+
   1 rows in set. Query took 0 seconds.
   
   ```
   
   ```
   ❯ echo 'select 1 num, 1 + 2 arith, cos(0.5) cos;' | cargo run --release 
--bin datafusion-cli -q -- --format csv
   num,arith,cos
   1,3,0.8775825618903728
   
   1 rows in set. Query took 0 seconds.
   
   ```
   ```
   cargo run --release --bin datafusion-cli -q -- --help
   DataFusion 4.0.0-SNAPSHOT
   DataFusion is an in-memory query engine that uses Apache Arrow as the memory 
model. It supports executing SQL queries
   against CSV and Parquet files as well as querying directly against in-memory 
data.
   
   USAGE:
       datafusion-cli [OPTIONS]
   
   FLAGS:
       -h, --help       Prints help information
       -V, --version    Prints version information
   
   OPTIONS:
       -c, --batch-size <batch-size>    The batch size of each query, or use 
DataFusion default
       -p, --data-path <data-path>      Path to your data, default to current 
directory
       -f, --file <file>                Execute commands from file, then exit
           --format <format>            Output format (possible values: table, 
csv) [default: table]
   
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to