*: honor task collation across DXF encoding and expression paths - #69734
*: honor task collation across DXF encoding and expression paths#69734joechenrh wants to merge 34 commits into
Conversation
|
Skipping CI for Draft Pull Request. |
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughThe change moves new-collation selection into expression contexts. It updates expression builtins, table indexes, partition encoding, DDL backfilling, importer plans, and Lightning codecs to use context-specific collation settings. Tests cover legacy and new-collation behavior. ChangesCollation context and expression operations
Table and task integration
Validation
Estimated code review effort: 4 (Complex) | ~60 minutes Sequence Diagram(s)sequenceDiagram
participant Task
participant ExpressionContext
participant TableEncoder
participant IndexOrPartition
Task->>ExpressionContext: configure target collation mode
ExpressionContext->>TableEncoder: expose NewCollationEnabled
TableEncoder->>IndexOrPartition: encode values with configured collator
IndexOrPartition-->>Task: return encoded index or partition result
Possibly related PRs
Suggested labels: Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Warning Review ran into problems🔥 ProblemsGit: Failed to clone repository. Please run the Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
pkg/expression/builtin_other.go (1)
28-29: 📐 Maintainability & Code Quality | 🟠 Major | ⚡ Quick winRun
make bazel_prepareafter the import-section change.
pkg/expression/builtin_other.goimport section was changed, so runmake bazel_prepareand include the generated Bazel metadata changes. If the command produces no diff, record that result in the PR.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@pkg/expression/builtin_other.go` around lines 28 - 29, Run make bazel_prepare after the import changes in pkg/expression/builtin_other.go, then include any generated Bazel metadata updates in the change; if it produces no diff, record that result in the PR.Source: Coding guidelines
🧹 Nitpick comments (2)
pkg/planner/core/expression_test.go (1)
492-494: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winScope the global collation change to the collation cases.
collate.SetNewCollationEnabledForTest(true)runs in the middle ofTestBuildExpression, and the restore is deferred to the end of the function. Every assertion after line 558 therefore runs with the new collation mode enabled and with the default utf8mb4 collation switched byswitchDefaultCollation. The remaining assertions look collation-insensitive today, but the coupling is easy to break later.Move the collation cases into a subtest, or restore the setting immediately after the loop.
♻️ Proposed scoping with a subtest
- origin := collate.NewCollationEnabled() - collate.SetNewCollationEnabledForTest(true) - defer collate.SetNewCollationEnabledForTest(origin) - collationSensitiveTbl := &model.TableInfo{ + t.Run("collation sensitive expressions", func(t *testing.T) { + origin := collate.NewCollationEnabled() + collate.SetNewCollationEnabledForTest(true) + defer collate.SetNewCollationEnabledForTest(origin) + collationSensitiveTbl := &model.TableInfo{Close the subtest after the assertion loop, and declare
exprlocally inside it so the outerexpris not reused.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@pkg/planner/core/expression_test.go` around lines 492 - 494, Scope the collation-enabled global state to only the collation cases in TestBuildExpression. Move the related setup and assertion loop into a subtest, declare expr within that subtest, and restore the original setting when the subtest completes so later assertions run with the prior collation configuration.pkg/table/tables/test/partition/partition_test.go (1)
76-80: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winAdd the opposite-mode assertion for the list-columns case.
The test builds the table with
useNewCollate=falseand asserts that"A"routes top_default. A regression that always routes to the default partition would also pass this assertion. Build the same metadata withTableFromMetaWithCollate(true, ...)and assert that"A"routes toDefinitions[0].ID(p0). This makes the snapshot behavior distinguishable from a fallback.♻️ Proposed positive control
physicalTbl, err := pt.GetPartitionByRow(tk.Session().GetExprCtx().GetEvalCtx(), types.MakeDatums("A")) require.NoError(t, err) require.Equal(t, tblInfo.Partition.Definitions[1].ID, physicalTbl.GetPhysicalID()) + + newCollateTbl, err := tables.TableFromMetaWithCollate(true, autoid.NewAllocators(tblInfo.SepAutoInc()), tblInfo) + require.NoError(t, err) + newCollatePt := newCollateTbl.GetPartitionedTable() + require.NotNil(t, newCollatePt) + physicalTbl, err = newCollatePt.GetPartitionByRow(tk.Session().GetExprCtx().GetEvalCtx(), types.MakeDatums("A")) + require.NoError(t, err) + require.Equal(t, tblInfo.Partition.Definitions[0].ID, physicalTbl.GetPhysicalID())🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@pkg/table/tables/test/partition/partition_test.go` around lines 76 - 80, Extend the list-columns partition test around GetPartitionByRow to also construct the table metadata with TableFromMetaWithCollate(true, ...). Route the same datum "A" through that table and assert its physical ID equals tblInfo.Partition.Definitions[0].ID (p0), while preserving the existing false-mode assertion for Definitions[1].ID.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@pkg/expression/builtin_compare.go`:
- Around line 3420-3421: Update the string-comparison path around
CompareStringWithCollationInfo and genCompareString to use the collation mode
captured from context by CheckAndDeriveCollationFromExprs, rather than the
process-global mode used by collate.GetCollator; pass the resolved
collate.Collator or obtain it through collate.GetCollatorWithCollate, preserving
the behavior selected by ctx.NewCollationEnabled.
---
Outside diff comments:
In `@pkg/expression/builtin_other.go`:
- Around line 28-29: Run make bazel_prepare after the import changes in
pkg/expression/builtin_other.go, then include any generated Bazel metadata
updates in the change; if it produces no diff, record that result in the PR.
---
Nitpick comments:
In `@pkg/planner/core/expression_test.go`:
- Around line 492-494: Scope the collation-enabled global state to only the
collation cases in TestBuildExpression. Move the related setup and assertion
loop into a subtest, declare expr within that subtest, and restore the original
setting when the subtest completes so later assertions run with the prior
collation configuration.
In `@pkg/table/tables/test/partition/partition_test.go`:
- Around line 76-80: Extend the list-columns partition test around
GetPartitionByRow to also construct the table metadata with
TableFromMetaWithCollate(true, ...). Route the same datum "A" through that table
and assert its physical ID equals tblInfo.Partition.Definitions[0].ID (p0),
while preserving the existing false-mode assertion for Definitions[1].ID.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 2b73578a-1de7-4a41-9c12-dee8e74b079f
📒 Files selected for processing (40)
pkg/ddl/backfilling_dist_scheduler.gopkg/ddl/backfilling_operators.gopkg/ddl/backfilling_test.gopkg/ddl/backfilling_txn_executor.gopkg/ddl/copr/BUILD.bazelpkg/ddl/copr/copr_ctx.gopkg/ddl/copr/copr_ctx_test.gopkg/ddl/index.gopkg/ddl/index_cop.gopkg/ddl/reorg.gopkg/executor/importer/BUILD.bazelpkg/executor/importer/import.gopkg/executor/importer/sampler.gopkg/expression/builtin.gopkg/expression/builtin_compare.gopkg/expression/builtin_ilike.gopkg/expression/builtin_ilike_test.gopkg/expression/builtin_other.gopkg/expression/builtin_string.gopkg/expression/exprctx/context.gopkg/expression/expression.gopkg/expression/exprstatic/BUILD.bazelpkg/expression/exprstatic/exprctx.gopkg/expression/sessionexpr/BUILD.bazelpkg/expression/sessionexpr/sessionctx.gopkg/expression/util.gopkg/lightning/backend/kv/base.gopkg/lightning/backend/kv/base_test.gopkg/lightning/backend/kv/context.gopkg/lightning/backend/kv/kv2sql.gopkg/lightning/backend/kv/sql2kv.gopkg/meta/model/reorg.gopkg/planner/core/expression_rewriter.gopkg/planner/core/expression_test.gopkg/table/tables/index.gopkg/table/tables/partition.gopkg/table/tables/tables.gopkg/table/tables/tables_test.gopkg/table/tables/test/partition/BUILD.bazelpkg/table/tables/test/partition/partition_test.go
💤 Files with no reviewable changes (3)
- pkg/executor/importer/sampler.go
- pkg/ddl/backfilling_txn_executor.go
- pkg/lightning/backend/kv/sql2kv.go
| return compareStringWithCollator(sctx, lhsArg, rhsArg, lhsRow, rhsRow, collate.GetCollator(collation)) | ||
| } |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟠 Major | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
set -euo pipefail
rg -n -C 6 '\b(genCompareString|CompareStringWithCollationInfo)\s*\(' pkg --glob '*.go'
rg -n -C 4 'WithNewCollationEnabled|NewCollationEnabled|collate\.GetCollator\(' \
pkg/expression pkg/lightning --glob '*.go'Repository: pingcap/tidb
Length of output: 26197
🏁 Script executed:
#!/bin/bash
set -euo pipefail
echo "== candidate collate symbols =="
rg -n -C 3 'func GetCollatorWithCollate|func NewCollationEnabled|func SetNewCollationEnabledForTest|var NewCollation' pkg/collate pkg/expression* pkg/lightning --glob '*.go' | head -n 220
echo
echo "== genCompareString callers only =="
rg -n -C 8 'genCompareString\s*\(' pkg --glob '*.go'
echo
echo "== CompareStringWithCollationInfo callers only =="
rg -n -C 8 'CompareStringWithCollationInfo\s*\(' pkg --glob '*.go'
echo
echo "== generate function template references =="
rg -n -C 12 'CompareStringWithCollationInfo|genCompareString|CompareString\(ctx|String\(ctx' pkg/expression/generator pkg/expression/*.go --glob '*.go' | head -n 260
echo
echo "== expression.go relevant helpers =="
sed -n '80,130p' pkg/expression/expression.goRepository: pingcap/tidb
Length of output: 238
🏁 Script executed:
#!/bin/bash
set -euo pipefail
echo "== repo top-level directories =="
find . -maxdepth 2 -type d | sed 's#^\./##' | sort | head -n 120
echo
echo "== locate collate.go =="
find . -path './.git' -prune -o -name 'collate.go' -print
echo
echo "== candidate collate symbols =="
rg -n -C 3 'func GetCollatorWithCollate|func NewCollationEnabled|func SetNewCollationEnabledForTest|var NewCollation' . --glob '*.go' | head -n 240
echo
echo "== genCompareString callers only =="
rg -n -C 8 '\bgenCompareString\s*\(' . --glob '*.go'
echo
echo "== CompareStringWithCollationInfo callers only =="
rg -n -C 8 '\bCompareStringWithCollationInfo\s*\(' . --glob '*.go'
echo
echo "== generate function template references =="
rg -n -C 12 'CompareStringWithCollationInfo|genCompareString|CompareString\(ctx|String\(ctx' . --glob '*.go' | head -n 320
echo
echo "== expression.go relevant helpers =="
sed -n '80,130p' pkg/expression/expression.goRepository: pingcap/tidb
Length of output: 40780
Capture the collation mode when making string comparisons reachable from genCompareString.
genCompareString derives the collation through CheckAndDeriveCollationFromExprs(ctx, ...), then CompareStringWithCollationInfo calls collate.GetCollator(collation), which uses the process-global collation mode. Use the captured context collation mode through that generic path, for example by passing collate.GetCollatorWithCollate(...) or the resolved collate.Collator that matches ctx.NewCollationEnabled.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@pkg/expression/builtin_compare.go` around lines 3420 - 3421, Update the
string-comparison path around CompareStringWithCollationInfo and
genCompareString to use the collation mode captured from context by
CheckAndDeriveCollationFromExprs, rather than the process-global mode used by
collate.GetCollator; pass the resolved collate.Collator or obtain it through
collate.GetCollatorWithCollate, preserving the behavior selected by
ctx.NewCollationEnabled.
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #69734 +/- ##
================================================
- Coverage 76.3227% 74.6024% -1.7204%
================================================
Files 2041 2107 +66
Lines 560306 609152 +48846
================================================
+ Hits 427641 454442 +26801
- Misses 131764 150772 +19008
- Partials 901 3938 +3037
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
🧹 Nitpick comments (1)
pkg/expression/exprstatic/exprctx_test.go (1)
185-185: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winPreserve coverage for the explicit collation override.
Line [185] excludes
newCollationEnabledfrom both comparisons. The test can then pass ifMakeExprContextStaticdrops or changes aWithNewCollationEnabled(...)override. Add a case with an explicit override and assert thatobj.NewCollationEnabled()equalsstaticObj.NewCollationEnabled().🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@pkg/expression/exprstatic/exprctx_test.go` at line 185, Add a test case in the comparison coverage around MakeExprContextStatic that applies an explicit WithNewCollationEnabled override, then assert obj.NewCollationEnabled() matches staticObj.NewCollationEnabled(). Ensure newCollationEnabled is no longer excluded from the comparison so changes to the override behavior are detected.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@pkg/expression/exprstatic/exprctx_test.go`:
- Line 185: Add a test case in the comparison coverage around
MakeExprContextStatic that applies an explicit WithNewCollationEnabled override,
then assert obj.NewCollationEnabled() matches staticObj.NewCollationEnabled().
Ensure newCollationEnabled is no longer excluded from the comparison so changes
to the override behavior are detected.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 97028f32-9fbf-47d3-a96e-9a724e51a855
📒 Files selected for processing (1)
pkg/expression/exprstatic/exprctx_test.go
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
| tblInfo *model.TableInfo, | ||
| idxCols []*model.IndexColumn, | ||
| requestSource string, | ||
| useNewCollate bool, |
There was a problem hiding this comment.
After this PR, almost all the code path can obtain useNewCollate from either Table/Index/BuildContext, so we can drop many of the previous added argument.
|
🔍 Starting code review for this PR... |
ingress-bot
left a comment
There was a problem hiding this comment.
This review was generated by AI and should be verified by a human reviewer.
Manual follow-up is recommended before merge.
Summary
- Total findings: 8
- Inline comments: 5
- Summary-only findings (no inline anchor): 2
Findings (highest risk first)
⚠️ [Major] (1)
- Collator-override guard for LOCATE case-folding is duplicated per eval mode, and the vectorized copy was left unfixed (pkg/expression/builtin_string.go:1669, pkg/expression/builtin_string_vec.go:429, pkg/expression/builtin_string.go:4106, pkg/expression/builtin_string_vec.go:1751)
🟡 [Minor] (6)
- ForKeyPruning's new private collation field is only preserved by full-struct copy across a package boundary (pkg/table/tables/partition.go:467, pkg/planner/core/rule/rule_partition_processor.go:281)
- Collation-mismatch push-down skip in buildDAGPB has no direct regression test (pkg/ddl/index_cop.go:192, pkg/ddl/backfilling_test.go:130, pkg/ddl/copr/copr_ctx_test.go:134)
- Collation-mode-mismatch pushdown skip in buildDAGPB has no code comment explaining the invariant (pkg/ddl/index_cop.go:192)
- Struct-copy that preserves ForKeyPruning.useNewCollate has no comment explaining why it isn't a fresh literal (pkg/planner/core/rule/rule_partition_processor.go:281, pkg/table/tables/partition.go:380)
- initNeedRestoreData comment no longer explains why laziness is still needed (pkg/table/tables/index.go:62, pkg/table/tables/index.go:85, pkg/table/tables/index.go:192)
- CanSkip's documented skip-cases were dropped when it became TableCommon.canSkip (pkg/table/tables/tables.go:1523)
🧹 [Nit] (1)
- collatorOverridden guard in LOCATE's manual case-folding has no explanation of the bug it prevents (pkg/expression/builtin_string.go:1669)
Unanchored findings
⚠️ [Major] (1)
- Collator-override guard for LOCATE case-folding is duplicated per eval mode, and the vectorized copy was left unfixed
- Request: Extract the collator-derived CI-folding decision (
!b.collatorOverridden && collate.IsCICollation(b.collation), or equivalently a check onb.collator()) into one shared helper called from bothevalIntandvecEvalIntforbuiltinLocate3ArgsUTF8Sig(and apply the same fix tobuiltinInstrUTF8Sig's scalar/vectorized pair), so the scalar and vectorized paths cannot drift again.
- Request: Extract the collator-derived CI-folding decision (
🟡 [Minor] (1)
- ForKeyPruning's new private collation field is only preserved by full-struct copy across a package boundary
- Request: Give
tables.ForKeyPruning(orPartitionExpr) an owned way to derive a copy with overriddenKeyPartCols, e.g. aWithKeyPartColsmethod, so callers outside the package don't need to know they must shallow-copy the struct to preserve its private state.
- Request: Give
| partExpr := tbl.(base.PartitionTable).PartitionExpr() | ||
| partCols, colLen := partExpr.GetPartColumnsForKeyPartition(columns) | ||
| pe := &tables.ForKeyPruning{KeyPartCols: partCols} | ||
| pe := *partExpr.ForKeyPruning |
There was a problem hiding this comment.
🟡 [Minor] Struct-copy that preserves ForKeyPruning.useNewCollate has no comment explaining why it isn't a fresh literal
Impact
getUsedKeyPartitions now copies partExpr.ForKeyPruning by value instead of building a fresh tables.ForKeyPruning{KeyPartCols: partCols} literal, purely to carry over the useNewCollate field that pe.LocateKeyPartition -> datumToHashKey depends on for correct key hashing.
Nothing at the call site records that intent, so a future edit that "simplifies" this back to a literal construction (a very plausible cleanup, since the old code did exactly that) would silently reset useNewCollate to false and route rows to the wrong key partition without any compile-time or obvious runtime signal.
Scope
pkg/planner/core/rule/rule_partition_processor.go:281—getUsedKeyPartitionspkg/table/tables/partition.go:380—ForKeyPruning.datumToHashKey
Evidence
pe := *partExpr.ForKeyPruning; pe.KeyPartCols = partCols replaces the old &tables.ForKeyPruning{KeyPartCols: partCols} literal with no comment; ForKeyPruning.useNewCollate is only set once, at construction in generateKeyPartitionExpr, and is otherwise invisible from this call site.
Change request
Add a short comment at the copy explaining that it must copy the existing struct (not build a fresh literal) to preserve useNewCollate, which key-partition hashing depends on for correctness.
There was a problem hiding this comment.
41bad5e adds a comment explaining that the full struct copy is intentional and preserves the captured collation mode.
I am not adding a WithKeyPartCols method here because it would expand the table API for one call site. The local copy remains small and preserves all private pruning state.
There was a problem hiding this comment.
✅ Resolved — a comment at the struct copy now records that it intentionally preserves the captured collation mode rather than rebuilding a fresh literal. Keeping this a local copy instead of a new table API method is a sensible call for a single call site.
|
What problem does this PR solve?
Issue Number: close #69563
Problem Summary:
DXF executes tasks in the SYSTEM keyspace. If its new-collation setting differs from the submitting user keyspace, collation-sensitive encoding and expression paths can use the worker setting and produce incompatible data.
What changed and how does it work?
TableandIndexown the encoder used for comparable table and index keys, restored-data decisions, partition routing, and partial-index evaluation.BuildContexttake charges of the expression evaluation, it also owns the mode used to construct collation-sensitive scalar expressions for DDL reorganization and IMPORT generated-column or assignment evaluation.WithCollateAPIs. This keeps one task snapshot consistent across key encoding and expression evaluation.Encoderpropagation from row/value encoding. New collation changes comparable string sort keys, while row values, old-row values, and genericHashCodeserialization use non-comparable encoding and produce identical bytes in either mode. Their original APIs therefore do not need this state.Expression scope: this PR covers scalar expression evaluation used by DXF. Vectorized builtin implementations and the historical
INSTRevaluation remain unchanged.Check List
Tests
The local NextGen cluster used
new_collations_enabled_on_first_bootstrap = falsein the user keyspace andtruein the SYSTEM keyspace. Every case ranADMIN CHECK TABLE, checked index/table results where applicable, performed INSERT/UPDATE/DELETE, and ranADMIN CHECK TABLEagain.ADD INDEX
PRIMARY KEY(id) CLUSTERED,id/fk VARCHARALTER TABLE t ADD INDEX idx_fk(fk)PRIMARY KEY(id1,id2) CLUSTERED,fk INTALTER TABLE t ADD INDEX idx_fk(fk)LOWER(raw),UPPER(raw),CONCAT(id,':',raw),SUBSTR(raw,1,2)generated columnsid/raw VARCHAR, clustered VARCHAR PKLOWER,UPPER,CONCAT, andSUBSTRid VARCHAR COLLATE utf8mb4_general_ci,PARTITION BY LIST COLUMNS(id)ALTER TABLE t ADD INDEX idx_fk(fk)id VARCHAR COLLATE utf8mb4_general_ci,PARTITION BY KEY(id) PARTITIONS 4ALTER TABLE t ADD INDEX idx_fk(fk)id VARCHAR COLLATE utf8mb4_general_ci,PARTITION BY RANGE COLUMNS(id)ALTER TABLE t ADD INDEX idx_fk(fk)raw VARCHAR COLLATE utf8mb4_general_ciALTER TABLE t ADD INDEX idx_partial(fk) WHERE raw='A'=,IN,LIKE,IF,CASE,STRCMP,LOCATE, andGREATESTADMIN CHECK TABLEENUM('A','a','B'),SET('A','a','B')withutf8mb4_general_ciIMPORT INTO
The table omits storage URLs; each operation is
IMPORT INTO ... FROM <CSV>.PRIMARY KEY(id) CLUSTERED,KEY(fk)IMPORT INTO t(@1,id,fk)PRIMARY KEY(id) CLUSTERED,fk INT,KEY(fk)IMPORT INTO t(fk,id,@3)PRIMARY KEY(id1,id2) CLUSTERED,KEY(fk)IMPORT INTO t(id2,fk,id1)PRIMARY KEY(id1,id2) CLUSTERED,fk VARCHAR,KEY(fk)IMPORT INTO t(id1,id2,fk)PRIMARY KEY(id1,id2) CLUSTERED,id1/id2 CHAR,KEY(fk)IMPORT INTO t(fk,id1,id2)KEY(fk(2))IMPORT INTO t(@1,id,fk)IMPORT INTO t(@1,id,fk)LOWER,UPPER,CONCAT, andSUBSTR, all indexedIMPORT INTO t(@1,id,raw)LOWER,UPPER,CONCAT, andSUBSTRresultsIMPORT INTO t(@1,@2,@3) SET ...IMPORT INTO t(id,fk,payload)PARTITION BY LIST COLUMNS(id)IMPORT INTO t(id,fk)PARTITION BY RANGE COLUMNS(id)IMPORT INTO t(id,fk)PARTITION BY KEY(id) PARTITIONS 4IMPORT INTO t(id,fk)KEY idx_partial(fk) WHERE raw='A'IMPORT INTO t(@id,@raw) SET fk=CONCAT('v',@id)=,IN,LIKE,IF,CASE,STRCMP,LOCATE,GREATESTIMPORT INTO t(id,raw)=,IN,LIKE,IF,CASE,STRCMP,LOCATE,GREATESTIMPORT INTO t(@id,@raw) SET ...ENUM('A','a','B'),SET('A','a','B'), both indexedIMPORT INTO t(id,e,s)<=>,!=,<,>=,ILIKE,REGEXP,FIELD,LEAST,WEIGHT_STRINGIMPORT INTO t(@id,@raw) SET ...Latest upstream and this PR were tested with the same cluster and input files:
Side effects
Documentation
Release note
Please refer to Release Notes Language Style Guide to write a quality release note.
Summary by CodeRabbit
Bug Fixes
Tests