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

Update HttpTransport.php #13

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

giko45
Copy link

@giko45 giko45 commented Jun 27, 2020

using a format on the builder gave an error.

    -> format(Format::JSON_COMPACT)

The sql send to clickhpuse server contained 2 FORMAT settings.

@evsign
Copy link
Collaborator

evsign commented Jun 29, 2020

Have you tested this? I think this can lead to an exception because of calling json_decode on request result.

@giko45
Copy link
Author

giko45 commented Jun 29, 2020

Yes i tested my use case (i did not run the included tests). It required an change in the builder too. See:
the-tinderbox/ClickhouseBuilder#28

However by writing a raw select i can use the Clickhouse JSONCompact format without modifications to ClickhouseClient and/or Builder
-> select("select * from table order by time DESC limit 5000 FORMAT JSONCompact")

@giko45
Copy link
Author

giko45 commented Jul 9, 2020

Sorry,

even writing a raw select like this
-> select("select * from table order by time DESC limit 5000 FORMAT JSONCompact")
needs the modification in this PR to work.

json_decode on request result works without issues. JSONCompact is still valid json

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

Successfully merging this pull request may close these issues.

2 participants