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

Flip default value of the incremental option and/or add --incremental into the help message #228

Closed
liancheng opened this issue Nov 28, 2018 · 3 comments

Comments

@liancheng
Copy link
Contributor

liancheng commented Nov 28, 2018

Currently (1.6.0), SQLLine doesn't provide a nice user experience by default because:

  • The default output format is table.
  • The incremental option is set to true by default and often destroys the table output because columns cannot be properly aligned.

My personal experience is that people usually use the table output format when doing interactive short queries with relatively short outputs, where the incremental mode doesn't help a lot. On the other hand, if a user wants to extract a lot of data from SQLLine s/he probably wants to use either the JSON or the CSV output format and pipe the results to some other tools for further processing. Not sure whether my experience conforms to most SQLLine users. If yes, setting incremental to false might make more sense.

When trying SQLLine for the first time, I thought there was a bug in column widths computation, and I always fall back to the CSV output format for daily uses. Only until much later, when I was trying to find and fix this "bug", I discovered the incremental option from the SQLLine source code. The fact that there's no command line option for setting the incremental option makes this option even harder to discover (I don't think most users read through the manual when trying SQLLine for the first time).

If flipping the default incremental value is not feasible, adding a --incremental command line option may make this feature more discoverable and easier to tune (e.g., alias sqlline sqlline --incremental=false)

EDIT:

I just realized that it's possible to set any SQLLine options using --option-name=value and I can already do --incremental=false. So, it was the fact that --incremental didn't appear in the help message that made it hard to discover for me. Shall we add --incremental to the help message? Or maybe add all the options to the help message?

@liancheng liancheng changed the title Flip default value of the incremental option and/or add a command line option for it. Flip default value of the incremental option and/or add --incremental into the help message Nov 28, 2018
@julianhyde
Copy link
Owner

I agree. It makes sense to make incremental false by default, and to add --incremental to help.

@liancheng
Copy link
Contributor Author

Sent PR #229 to address this issue.

@julianhyde
Copy link
Owner

Fixed in 30f8ddb, PR #229. Thanks for the contribution, @liancheng!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants