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: decode nested prefixes in variant #1506

Merged
merged 1 commit into from
Feb 20, 2025

Conversation

SpencerTorres
Copy link
Member

@SpencerTorres SpencerTorres commented Feb 20, 2025

Summary

While #1501 added support for Variant/Dynamic/JSON arrays, this PR adds support for nested arrays of those types. For example, Array(JSON)::Dynamic.

The issue was that the underlying Variant implementation wasn't reading the prefixes of the inner columns. This was only an issue for column types that required a prefix themself, such as Array(JSON) inside Dynamic or Variant. Some tests have been added to verify that there's no errors while decoding these.

closes grafana/clickhouse-datasource#1168

Checklist

  • Unit and integration tests covering the common scenarios were added

@SpencerTorres SpencerTorres merged commit cb733b4 into main Feb 20, 2025
13 of 14 checks passed
@SpencerTorres SpencerTorres deleted the variant_decode_nested_prefix branch February 20, 2025 22:20
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.

Unsupported json/dynamic serialization
1 participant