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

Use quotes in prettify output #41

Open
hagen1778 opened this issue Jan 24, 2025 · 1 comment
Open

Use quotes in prettify output #41

hagen1778 opened this issue Jan 24, 2025 · 1 comment
Assignees

Comments

@hagen1778
Copy link
Contributor

With #40 metricsql package now supports quoted metric names {"metric_name"}. It also allows using arbitrary UTF8 chars within the quotes: {"3foo3"}. However, the prettify functionality would transform {"3foo3"} in \3foo\3.
It would be great, for user's convenience, to keep quotes instead of escaping. The expected test cases for prettyfying are the following:

  • {"metric"} => metric
  • {"3metric"} => {"3metric"}
  • {"met\"ric"} => {"met\"ric"}
@possibull
Copy link
Contributor

Also the case of using any metric name in prettify will fail by stripping the quotes ie {"foo"} will become {foo} which is invalid.

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