Skip to content

Sync json transport protocol with proton. #73

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

Merged
merged 2 commits into from
Nov 26, 2024

Conversation

Yibo-Chen13
Copy link
Contributor

No description provided.

@Yibo-Chen13 Yibo-Chen13 linked an issue Nov 18, 2024 that may be closed by this pull request
@Yibo-Chen13 Yibo-Chen13 force-pushed the enhance/50-go-driver-should-support-type-json branch 15 times, most recently from c0e2b34 to 08c522f Compare November 21, 2024 05:59
@@ -71,10 +71,11 @@ func TestJson(t *testing.T) {
resultMap map[string]interface{}
resultStr string
)
if err := conn.QueryRow(ctx, "SELECT (* except _tp_time) FROM test_json WHERE _tp_time > earliest_ts() LIMIT 1").Scan(&resultMap); assert.NoError(t, err) {
time.Sleep(3 * time.Second)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks previous select from stream with "WHERE _tp_time > earliest_ts() LIMIT 1" is a little better as no need to write additional time.Sleep

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But if without sleep ,the select result become "{\"_dummy\": 0}".I think it is due to SerializationObject will check if the column is finalized.If there is no exact json data,a default null value "{\"_dummy\": 0}" will be seted.

https://github.com/timeplus-io/proton-enterprise/blob/000ee5b5dda6428fd7333442f07ce28b591f8d19/src/DataTypes/Serializations/SerializationObject.cpp#L277

Maybe due to network or scheduling reasons, the json column has not been fully inserted successfully at the time of the select query,so we get the result "{\"_dummy\": 0}".But I'm not sure, maybe I need some time to find out why.

@Yibo-Chen13 Yibo-Chen13 force-pushed the enhance/50-go-driver-should-support-type-json branch from 08c522f to 7b55be8 Compare November 25, 2024 08:07
@Yibo-Chen13 Yibo-Chen13 merged commit 43e51b9 into develop Nov 26, 2024
6 checks passed
@Yibo-Chen13 Yibo-Chen13 deleted the enhance/50-go-driver-should-support-type-json branch November 26, 2024 01:41
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.

go driver should support type json
2 participants