Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Executing certain multi line queries causes the first line of the query to jump to the previous line #103

Closed
MichaelBurgess opened this issue Jan 29, 2021 · 1 comment
Assignees
Labels
bug Something isn't working
Milestone

Comments

@MichaelBurgess
Copy link
Contributor

MichaelBurgess commented Jan 29, 2021

Issue

After executing certain multi-line queries cause the query to jump to the last line of output before your query.

Expected Outcome

If I execute a query such as this, the output is as expected - the query is displayed as entered and the result is displayed below:

> select name
from aws_iam_role
where arn = 'arn:aws:iam::012345678901:role/turbot/acm_admin'
  and region = 'global'
  and permissions_boundary_type = 'Policy';
+-----------+
| NAME      |
+-----------+
| acm_admin |
+-----------+

Actual Outcome

...however if I paste in the following query for a table I'm working on, then after executing it, the first line of the query is displayed at the end of the previous line of output in the terminal.

So if I enter:

> select result
from aws_iam_policy_simulator
where principal_arn = 'arn:aws:iam::012345678901:user/mike'
  and action = 's3:CreateBucket'
  and resource_arn = '*';

...after submitting I see this:

+-----------+
| acm_admin |
+-----------+           > select result
from aws_iam_policy_simulator
where principal_arn = 'arn:aws:iam::012345678901:user/mike'
  and action = 's3:CreateBucket'
  and resource_arn = '*';
+-------------------------------------------------------------------------------------------------------------------------------------------------------------
| RESULT
+-------------------------------------------------------------------------------------------------------------------------------------------------------------
| ...
+-------------------------------------------------------------------------------------------------------------------------------------------------------------

Video below illustrating the issue also:

Screen.Recording.2021-01-29.at.12.09.11.mov

Env

CLI: 0.1.0
OS: macOS Big Sur 11.1
Terminal: iTerm 3.4.3 / zsh

@kaidaguerre kaidaguerre added 0.1.2 bug Something isn't working labels Jan 29, 2021
@binaek
Copy link
Contributor

binaek commented Feb 1, 2021

Can also be reproduced with the query:

select
  r.name as release_name,
  sum((a -> 'download_count')::int) as download_count
from
  github_release as r,
  jsonb_array_elements(assets) as a
where
  r.repository_full_name = 'turbot/steampipe'
  and a ->> 'content_type' = 'application/zip'
group by
  release_name
order by
  download_count desc; 

in interactive mode

@kaidaguerre kaidaguerre added this to the 0.1.4 milestone Feb 9, 2021
@kaidaguerre kaidaguerre removed the 0.1.2 label Feb 9, 2021
ahirreddy pushed a commit to ahirreddy/steampipe that referenced this issue Jul 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants