Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Discussion options

Hi, I have a question about how the JSON type with hints works exactly. If I have something like this:

CREATE TABLE test (json JSON(a.b UInt32)) ENGINE = Memory;

can I then safely do something like this:

ALTER TABLE test MODIFY COLUMN json JSON(a.b UInt32, a.c String);

How about this:

ALTER TABLE test MODIFY COLUMN json JSON(a.b String);

Or this:

ALTER TABLE test MODIFY COLUMN json JSON(a.c String);

What exactly is the behavior? Does the type hint influence query time, or ingest time, or both? What happens to the existing data when modifying the type? I'm ingesting JSON data with a schema that can change over time and I want to provide as much type hints as possible.

You must be logged in to vote

Replies: 0 comments

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
🙏
Q&A
Labels
None yet
1 participant
Morty Proxy This is a proxified and sanitized view of the page, visit original site.