Skip to content

Comments

Update HttpTransport.php#13

Open
giko45 wants to merge 1 commit intothe-tinderbox:masterfrom
giko45:master
Open

Update HttpTransport.php#13
giko45 wants to merge 1 commit intothe-tinderbox:masterfrom
giko45:master

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