[docs](variant) document VARIANT behavior in Doris 4.2+#4001
Draft
eldenmoon wants to merge 10 commits into
Draft
[docs](variant) document VARIANT behavior in Doris 4.2+#4001eldenmoon wants to merge 10 commits into
eldenmoon wants to merge 10 commits into
Conversation
yiguolei
reviewed
Jul 21, 2026
| @@ -0,0 +1,177 @@ | |||
| --- | |||
| { | |||
| "title": "VARIANT V2 Behavior and Semantics", | |||
Contributor
There was a problem hiding this comment.
这个文档,跟底下的variant的合并了吧。 我们每个类型一个文档,包括这个类型相关的所有的信息。
yiguolei
reviewed
Jul 21, 2026
| @@ -0,0 +1,71 @@ | |||
| --- | |||
| { | |||
| "title": "PARSE_TO_VARIANT_ERROR_TO_NULL", | |||
yiguolei
reviewed
Jul 21, 2026
|
|
||
| ## 概览 | ||
|
|
||
| 实验性 VARIANT V2 扩展了可以消费 `VARIANT` 值的运算,并为分组、去重和集合运算定义了一致的 logical-value 语义。 |
Contributor
There was a problem hiding this comment.
不要暴露variant v2.
我们应该是比如说4.2 之后的variant 具备哪些功能。
yiguolei
reviewed
Jul 21, 2026
|
|
||
| ## 参数 | ||
|
|
||
| - `json_text`:包含一个完整 JSON 值的 `VARCHAR` 表达式。 |
Contributor
There was a problem hiding this comment.
这个parse to variant,不可以输入一个jsonb 吗?
yiguolei
reviewed
Jul 21, 2026
| SELECT PARSE_TO_VARIANT('null'); | ||
| ``` | ||
|
|
||
| ### 提取值并 CAST 为确定类型 |
Contributor
There was a problem hiding this comment.
这里少一个cast的文档。
cast 文档中包括两部分:
- cast to variant, 把其他类型cast 到variant
- cast variant 到其他类型
yiguolei
reviewed
Jul 21, 2026
|
|
||
| ## Equality 语义 | ||
|
|
||
| 开启 VARIANT V2 后,支持的分组、去重和集合运算会按 logical value 判断相等性,而不是按来源 SQL 类型或表示形式: |
Contributor
There was a problem hiding this comment.
需要补充一下关于join,order by,group by的支持情况;
hash 值计算的情况
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
Why
The documentation should describe user-visible VARIANT capabilities by Doris version, not expose the internal ColumnVariantV2 implementation. The refactor also consolidates one data type into one reference page and fills the missing CAST, JSONB, hash, grouping, join, and ordering details requested in review.
Validation