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

[C++][Parquet] Tools: Debug Print for Json might not a valid json #44101

Closed
mapleFU opened this issue Sep 13, 2024 · 2 comments
Closed

[C++][Parquet] Tools: Debug Print for Json might not a valid json #44101

mapleFU opened this issue Sep 13, 2024 · 2 comments

Comments

@mapleFU
Copy link
Member

mapleFU commented Sep 13, 2024

Describe the enhancement requested

Currently we're using debug tools to analysis, I found that the printJson might not print a valid json message

This is ok for human-reading, but making analysis harder

Component(s)

C++, Parquet

@mapleFU
Copy link
Member Author

mapleFU commented Sep 13, 2024

take

mapleFU added a commit to mapleFU/arrow that referenced this issue Oct 25, 2024
mapleFU added a commit that referenced this issue Oct 31, 2024
…JSON (#44532)

### Rationale for this change

The printJson is not a valid json now. This is ok for human-read, but when I want to analysis it with json tools or ai, it will prevent from using it.

### What changes are included in this PR?

Change the output to be a valid json.

Style:

previously, the `\"` trailing would be added in start of object, but this patch put it to end of object

Before:
```
stream << "\", \"number\":\""  << number;
stream << "\"...";
```

After:

```
stream << ", \"number\":\""  << number << "\"";
```

### Are these changes tested?

Yes

### Are there any user-facing changes?

Minor format change

* GitHub Issue: #44101

Authored-by: mwish <[email protected]>
Signed-off-by: mwish <[email protected]>
@mapleFU mapleFU added this to the 19.0.0 milestone Oct 31, 2024
@mapleFU
Copy link
Member Author

mapleFU commented Oct 31, 2024

Issue resolved by pull request 44532
#44532

@mapleFU mapleFU closed this as completed Oct 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant