opensearch-project / opensearch-cli

A full-featured command line interface (CLI) for OpenSearch.
https://opensearch.org/docs/latest/clients/cli/
Apache License 2.0
44 stars 24 forks source link

[BUG] CLI displays different data when alias is used compared to when not #59

Closed MitchellGale closed 1 year ago

MitchellGale commented 2 years ago

Description When alias used in select statement on integer column result can differ from without alias.

How can one reproduce the bug? Steps to reproduce the behavior:

  1. Go to cli
  2. run select on a column of integers with and without an alias

What is the expected behavior? Aliased and non-aliased columns should show the same data.

What is your host/environment?

Screenshot ![Uploading Screen Shot 2022-06-15 at 3.57.07 PM.png…]()


opensearchsql> SELECT int0 as "test" FROM calcs;                                                                                                                                                                                                            
fetched rows / total rows = 17/17
+----------+
| "test"   |
|----------|
| 1        |
|          |
|          |
|          |
| 7        |
| 3        |
| 8        |
|          |
|          |
| 8        |
| 4        |
| 10       |
|          |
| 4        |
| 11       |
| 4        |
| 8        |
+----------+
opensearchsql> SELECT int0 FROM calcs;                                                                                                                                                                                                                      
fetched rows / total rows = 17/17
+--------+
| int0   |
|--------|
| 0      |
| 0      |
| 0      |
| 0      |
| 0      |
| 0      |
| 0      |
| 0      |
| 0      |
| 0      |
| 0      |
| 0      |
| 0      |
| 0      |
| 0      |
| 0      |
| 0      |
+--------+
VijayanB commented 2 years ago

@MitchellGale-BitQuill I believe you may want to raise this issue here https://github.com/opensearch-project/sql/tree/main/sql-cli

MitchellGale commented 2 years ago

@VijayanB Thank you.

wbeckler commented 1 year ago

Closing as it's being raised elsewhere.