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

Fix serialization failure when invoking json_table #20122

Merged
merged 1 commit into from
Dec 14, 2023

Conversation

martint
Copy link
Member

@martint martint commented Dec 14, 2023

The concrete type declared in the JsonTableFunctionHandle is not directly serializable. The deserializer binding is only declared for the Type class.

Release notes

(x) Release notes are required, with the following suggested text:

# Section
* Fix query failure when invoking `json_table`. ({issue}`20122`)

The concrete type declared in the JsonTableFunctionHandle is not directly serializable.
The deserializer binding is only declared for the Type class.
@cla-bot cla-bot bot added the cla-signed label Dec 14, 2023
@martint martint merged commit 0fc9389 into trinodb:master Dec 14, 2023
@martint martint deleted the json_table branch December 14, 2023 18:59
@github-actions github-actions bot added this to the 436 milestone Dec 14, 2023
@@ -6694,6 +6694,22 @@ SELECT a(10)
.hasMessage("line 3:8: Recursive language functions are not supported: a(integer):integer");
}

// ensure that JSON_TABLE runs properly in distributed mode (i.e., serialization of handles works correctly, etc)
Copy link
Member

Choose a reason for hiding this comment

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

i'd expect io.trino.sql.query.TestJsonTable to run in distributed mode.

Copy link
Member Author

Choose a reason for hiding this comment

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

It didn't until recently, when we replaced LocalQueryRunner with StandaloneQueryRunner

Copy link
Member

Choose a reason for hiding this comment

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

thanks for explaining.

and forgive my ignorance, what's the difference between StandaloneQueryRunner and DistributedQueryRunner?
I see StandaloneQueryRunner runs one node (which should be possible with DistributedQueryRunner, but may not be desirable), and also uses DirectTrinoClient to skip client protocol (also not sure if desirable). But i am sure i don't see the full picture.

Copy link
Member Author

Choose a reason for hiding this comment

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

StandaloneQueryRunner is in trino-main and supports all the tests that live there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

3 participants