Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
b64794c
update
daviszhen Jul 31, 2026
68206db
update
daviszhen Jul 31, 2026
d390235
update
daviszhen Jul 31, 2026
3ec76e5
update
daviszhen Jul 31, 2026
6f919cd
update
daviszhen Aug 3, 2026
b8228aa
Merge branch 'main' into 0731-fix-insert-ignore
daviszhen Aug 3, 2026
55d6bcf
update
daviszhen Aug 3, 2026
ca48d92
Merge branch 'main' into 0731-fix-insert-ignore
daviszhen Aug 3, 2026
e9e6272
update
daviszhen Aug 3, 2026
461a9a7
update
daviszhen Aug 3, 2026
3d1a623
update
daviszhen Aug 3, 2026
3570ac3
update
daviszhen Aug 3, 2026
8fc454c
update
daviszhen Aug 3, 2026
b23467f
update
daviszhen Aug 3, 2026
cc8259c
update
daviszhen Aug 3, 2026
7478b88
update
daviszhen Aug 3, 2026
7615549
Merge branch '0731-fix-insert-ignore' of https://github.com/daviszhen…
daviszhen Aug 3, 2026
d1611fe
Merge branch 'main' into 0731-fix-insert-ignore
daviszhen Aug 3, 2026
62a91ec
update
daviszhen Aug 3, 2026
fede392
update
daviszhen Aug 3, 2026
746859c
Merge branch '0731-fix-insert-ignore' of https://github.com/daviszhen…
daviszhen Aug 3, 2026
2f4787c
update
daviszhen Aug 4, 2026
c968c67
update
daviszhen Aug 4, 2026
4497577
Merge branch 'main' into 0731-fix-insert-ignore
daviszhen Aug 4, 2026
39cb6b7
update
daviszhen Aug 4, 2026
acaa808
Merge branch '0731-fix-insert-ignore' of https://github.com/daviszhen…
daviszhen Aug 4, 2026
86ad8fe
Merge branch 'main' into 0731-fix-insert-ignore
daviszhen Aug 4, 2026
fcf5052
update ut
daviszhen Aug 4, 2026
7532437
Merge branch '0731-fix-insert-ignore' of https://github.com/daviszhen…
daviszhen Aug 4, 2026
106af34
update
daviszhen Aug 4, 2026
f1a90e7
update
daviszhen Aug 4, 2026
c716491
Merge branch 'main' into 0731-fix-insert-ignore
daviszhen Aug 4, 2026
50f55a7
Merge branch 'main' into 0731-fix-insert-ignore
mergify[bot] Aug 4, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1,008 changes: 526 additions & 482 deletions pkg/pb/pipeline/pipeline.pb.go

Large diffs are not rendered by default.

30 changes: 17 additions & 13 deletions pkg/sql/compile/remoterunServer.go
Original file line number Diff line number Diff line change
Expand Up @@ -680,11 +680,12 @@ type processHelper struct {
txnClient client.TxnClient
sessionInfo process.SessionInfo
//analysisNodeList []int32
StmtId uuid.UUID
prepareParams pipeline.PrepareParamInfo
affectedRows int64
remoteFragmentCounts map[string]uint32
remoteExecutionID uuid.UUID
StmtId uuid.UUID
statementRuntimeIgnore bool
prepareParams pipeline.PrepareParamInfo
affectedRows int64
remoteFragmentCounts map[string]uint32
remoteExecutionID uuid.UUID
}

// messageReceiverOnServer supported a series methods to write back results.
Expand Down Expand Up @@ -869,7 +870,9 @@ func (receiver *messageReceiverOnServer) newCompile() (*Compile, error) {
{
txn := proc.GetTxnOperator().Txn()
txnId := txn.GetID()
proc.Base.StmtProfile = process.NewStmtProfile(uuid.UUID(txnId), pHelper.StmtId)
stmtProfile := process.NewStmtProfile(uuid.UUID(txnId), pHelper.StmtId)
stmtProfile.SetStatementRuntimeProfile("", "", pHelper.statementRuntimeIgnore)
proc.Base.StmtProfile = stmtProfile
}

c := allocateNewCompile(proc)
Expand Down Expand Up @@ -1052,13 +1055,14 @@ func generateProcessHelper(ctx context.Context, data []byte, cli client.TxnClien
}

result := processHelper{
id: procInfo.Id,
lim: process.ConvertToProcessLimitation(procInfo.Lim),
unixTime: procInfo.UnixTime,
accountId: procInfo.AccountId,
txnClient: cli,
affectedRows: procInfo.AffectedRows,
remoteFragmentCounts: maps.Clone(procInfo.RemoteFragmentCounts),
id: procInfo.Id,
lim: process.ConvertToProcessLimitation(procInfo.Lim),
unixTime: procInfo.UnixTime,
accountId: procInfo.AccountId,
txnClient: cli,
affectedRows: procInfo.AffectedRows,
statementRuntimeIgnore: procInfo.StatementRuntimeIgnore,
remoteFragmentCounts: maps.Clone(procInfo.RemoteFragmentCounts),
}
if len(procInfo.RemoteExecutionId) > 0 {
result.remoteExecutionID, err = uuid.FromBytes(procInfo.RemoteExecutionId)
Expand Down
24 changes: 14 additions & 10 deletions pkg/sql/compile/remoterunServer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -235,12 +235,13 @@ func TestNewCompile_CreatesCorrectStructure(t *testing.T) {
storeEngine: mockEngine,
},
procBuildHelper: processHelper{
id: "test-proc-id",
accountId: catalog.System_Account,
unixTime: time.Now().Unix(),
affectedRows: 42,
txnClient: txnClient,
txnOperator: txnOperator,
id: "test-proc-id",
accountId: catalog.System_Account,
unixTime: time.Now().Unix(),
affectedRows: 42,
statementRuntimeIgnore: true,
txnClient: txnClient,
txnOperator: txnOperator,
prepareParams: pipeline.PrepareParamInfo{
Length: 2,
Data: append([]byte(nil), params.GetData()...),
Expand All @@ -265,6 +266,7 @@ func TestNewCompile_CreatesCorrectStructure(t *testing.T) {
require.True(t, compile.proc.GetPrepareParamIsBin(0))
require.False(t, compile.proc.GetPrepareParamIsBin(1))
require.Equal(t, int64(42), compile.proc.GetAffectedRows())
require.True(t, compile.proc.GetStmtProfile().GetStatementIgnore())
require.NotNil(t, compile.fill, "fill callback should be set")
remoteParams := compile.proc.GetPrepareParams()
require.NotPanics(t, compile.Release)
Expand Down Expand Up @@ -342,10 +344,11 @@ func TestGenerateProcessHelper_WithSnapshot(t *testing.T) {
t.Cleanup(func() { params.Free(proc.Mp()) })

procInfo := &pipeline.ProcessInfo{
Id: "test-proc-id",
AccountId: catalog.System_Account,
UnixTime: time.Now().Unix(),
AffectedRows: 42,
Id: "test-proc-id",
AccountId: catalog.System_Account,
UnixTime: time.Now().Unix(),
AffectedRows: 42,
StatementRuntimeIgnore: true,
Snapshot: txn.CNTxnSnapshot{
Txn: txn.TxnMeta{
ID: []byte("test-txn-id"),
Expand All @@ -371,6 +374,7 @@ func TestGenerateProcessHelper_WithSnapshot(t *testing.T) {
require.Equal(t, procInfo.PrepareParams.Data, helper.prepareParams.Data)
require.Equal(t, procInfo.PrepareParams.Area, helper.prepareParams.Area)
require.Equal(t, int64(42), helper.affectedRows)
require.True(t, helper.statementRuntimeIgnore)
require.NotNil(t, helper.txnOperator, "txnOperator should be created from snapshot")
// Verify that rebuilt txnOperator has nil workspace (key point for remote run)
require.Nil(t, helper.txnOperator.GetWorkspace(), "rebuilt txnOperator should have nil workspace initially")
Expand Down
Loading
Loading