-
Notifications
You must be signed in to change notification settings - Fork 3.8k
[feat](Variant) Support NestedGroup public config #64680
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
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -5329,8 +5329,11 @@ public DataType visitVariantPredefinedFields(VariantPredefinedFieldsContext ctx) | |
| } | ||
|
|
||
| if (enableNestedGroup) { | ||
| throw new NotSupportedException( | ||
| "variant_enable_nested_group is not supported now"); | ||
| enableVariantDocMode = false; | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This now lets FE create a table whose VARIANT column has
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Now that |
||
| variantMaxSubcolumnsCount = 0; | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This normalization should validate the final VARIANT property combination after session defaults and explicit properties have both been applied. Right now the validator only sees the raw property map, so conflicts where one side comes from a default are silently rewritten here. For example, with |
||
| enableTypedPathsToSparse = false; | ||
| variantMaxSparseColumnStatisticsSize = 0; | ||
| variantSparseHashShardCount = 0; | ||
| } | ||
|
Comment on lines
5331
to
5337
|
||
|
|
||
| // When doc mode is enabled, disable subcolumn extraction and sparse column features | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -187,6 +187,11 @@ public String toSql(int depth) { | |
| sb.append("\"variant_sparse_hash_shard_count\" = \"") | ||
| .append(String.valueOf(Math.max(1, variantSparseHashShardCount))).append("\""); | ||
| } | ||
| if (enableNestedGroup) { | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. When nested group is enabled the parser zeros |
||
| sb.append(","); | ||
| sb.append("\"variant_enable_nested_group\" = \"") | ||
| .append(String.valueOf(enableNestedGroup)).append("\""); | ||
| } | ||
| sb.append(")>"); | ||
| return sb.toString(); | ||
| } | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This new config is defined and registered, but it is not declared in
config.hnext to the other variant configs.DECLARE_mInt32is what exposesconfig::...values to BE code outsideconfig.cpp, so any code that tries to useconfig::variant_nested_group_max_depththrough the normal config header will fail to compile even though the runtime config name exists. Please add the matchingDECLARE_mInt32(variant_nested_group_max_depth);near the adjacent variant declarations.