-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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
executor/join : use shallow copy for join. #7433
Merged
Merged
Changes from 1 commit
Commits
Show all changes
49 commits
Select commit
Hold shift + click to select a range
a576cc0
iterator copy init
crazycs520 79b74e7
fix iterator bug
crazycs520 d9fe98b
fix nullmap index out of range and add test
crazycs520 8fa2ad8
refine code
crazycs520 33ae5a0
refine code
crazycs520 255c64b
remove iterator copy and use back to pre rows
crazycs520 0973373
checkout joiner.go file
crazycs520 055a41a
add check to bench
crazycs520 c5eeff9
Merge branch 'master' of /~https://github.com/pingcap/tidb into column-…
crazycs520 e7c6c64
iterator only once
crazycs520 ce8eb4f
add appendMultiSameNullBitmap
crazycs520 499b6f9
field by field only one line 2X
crazycs520 2a295a1
refine column copy
crazycs520 9d82447
refine column copy
crazycs520 ef85948
add shadow copy to join and move code
crazycs520 45b4631
Merge branch 'master' of /~https://github.com/pingcap/tidb into column-…
crazycs520 5bf279f
rename function
crazycs520 9690506
add comment
crazycs520 8db639f
add shadow copy to inner join
crazycs520 7a55ff5
refine code
crazycs520 05c1273
add shadow copy to all join
crazycs520 66a133c
remove redundancy code
crazycs520 dadb047
Merge branch 'master' of /~https://github.com/pingcap/tidb into column-…
crazycs520 b4192e4
remove column copy and redundancy code
crazycs520 4096997
address comment
crazycs520 b802941
add mutchunk
crazycs520 c5cfdf1
address comment
crazycs520 947f9d4
use mutRow instead of mut chunk.
crazycs520 24ab90e
address comment
crazycs520 2b8d896
refine code
crazycs520 3f82d2b
address comment
crazycs520 604e49d
Merge branch 'master' of /~https://github.com/pingcap/tidb into column-…
crazycs520 e5f4cbe
address comment
crazycs520 abbc2c9
address comment
crazycs520 e1dd31d
address comment and add test to mutRow_test
crazycs520 593b31c
remove chunk_copy_test.go
crazycs520 3a6fbb7
refine code
crazycs520 600fdc3
refine test
crazycs520 f4fbd70
refine test and code
crazycs520 23eaf1e
Merge branch 'master' of /~https://github.com/pingcap/tidb into column-…
crazycs520 e9ef7dd
optimize append num
crazycs520 21b5417
remove shadown copy on inner, leftOut, rightOut join, vectorized filt…
crazycs520 0aadbf6
address comment
crazycs520 0de2063
address comment
crazycs520 c681658
address comment
crazycs520 f8ccdf2
Merge branch 'master' of /~https://github.com/pingcap/tidb into column-…
crazycs520 c7b2301
Merge branch 'master' of /~https://github.com/pingcap/tidb into column-…
crazycs520 1e8a9f0
update test after merge
crazycs520 b939b3b
Merge branch 'master' into column-copy
XuHuaiyu File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
remove iterator copy and use back to pre rows
- Loading branch information
commit 255c64b09debaa07e92085681c11004ff31151fd
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -32,6 +32,8 @@ type Iterator interface { | |
// Next returns the next Row. | ||
Next() Row | ||
|
||
PreRows(i int) | ||
|
||
// End returns the invalid end Row. | ||
End() Row | ||
|
||
|
@@ -43,8 +45,6 @@ type Iterator interface { | |
|
||
// ReachEnd reaches the end of iterator. | ||
ReachEnd() | ||
|
||
Copy() Iterator | ||
} | ||
|
||
// NewIterator4Slice returns a Iterator for Row slice. | ||
|
@@ -77,6 +77,11 @@ func (it *iterator4Slice) Next() Row { | |
return row | ||
} | ||
|
||
// PreRows implements the Iterator interface. | ||
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 comment basically says nothing. You have to be more explicitly. |
||
func (it *iterator4Slice) PreRows(i int) { | ||
|
||
} | ||
|
||
// Current implements the Iterator interface. | ||
func (it *iterator4Slice) Current() Row { | ||
if it.cursor == 0 || it.cursor > it.Len() { | ||
|
@@ -100,14 +105,6 @@ func (it *iterator4Slice) Len() int { | |
return len(it.rows) | ||
} | ||
|
||
// Copy implements the Iterator interface. | ||
func (it *iterator4Slice) Copy() Iterator { | ||
return &iterator4Slice{ | ||
rows: it.rows, | ||
cursor: it.cursor, | ||
} | ||
} | ||
|
||
// NewIterator4Chunk returns a iterator for Chunk. | ||
func NewIterator4Chunk(chk *Chunk) *Iterator4Chunk { | ||
return &Iterator4Chunk{chk: chk} | ||
|
@@ -139,6 +136,14 @@ func (it *Iterator4Chunk) Next() Row { | |
return row | ||
} | ||
|
||
// PreRows implements the Iterator interface. | ||
func (it *Iterator4Chunk) PreRows(i int) { | ||
if it.cursor < i { | ||
it.Begin() | ||
} | ||
it.cursor = it.cursor - i | ||
} | ||
|
||
// Current implements the Iterator interface. | ||
func (it *Iterator4Chunk) Current() Row { | ||
if it.cursor == 0 || it.cursor > it.Len() { | ||
|
@@ -162,14 +167,6 @@ func (it *Iterator4Chunk) Len() int { | |
return it.chk.NumRows() | ||
} | ||
|
||
// Copy implements the Iterator interface. | ||
func (it *Iterator4Chunk) Copy() Iterator { | ||
return &Iterator4Chunk{ | ||
chk: it.chk, | ||
cursor: it.cursor, | ||
} | ||
} | ||
|
||
// NewIterator4List returns a Iterator for List. | ||
func NewIterator4List(li *List) Iterator { | ||
return &iterator4List{li: li} | ||
|
@@ -214,6 +211,11 @@ func (it *iterator4List) Next() Row { | |
return row | ||
} | ||
|
||
// PreRows implements the Iterator interface. | ||
func (it *iterator4List) PreRows(i int) { | ||
|
||
} | ||
|
||
// Current implements the Iterator interface. | ||
func (it *iterator4List) Current() Row { | ||
if (it.chkCursor == 0 && it.rowCursor == 0) || it.chkCursor > it.li.NumChunks() { | ||
|
@@ -242,15 +244,6 @@ func (it *iterator4List) Len() int { | |
return it.li.Len() | ||
} | ||
|
||
// Copy implements the Iterator interface. | ||
func (it *iterator4List) Copy() Iterator { | ||
return &iterator4List{ | ||
li: it.li, | ||
chkCursor: it.chkCursor, | ||
rowCursor: it.rowCursor, | ||
} | ||
} | ||
|
||
// NewIterator4RowPtr returns a Iterator for RowPtrs. | ||
func NewIterator4RowPtr(li *List, ptrs []RowPtr) Iterator { | ||
return &iterator4RowPtr{li: li, ptrs: ptrs} | ||
|
@@ -282,6 +275,11 @@ func (it *iterator4RowPtr) Next() Row { | |
return row | ||
} | ||
|
||
// PreRows implements the Iterator interface. | ||
func (it *iterator4RowPtr) PreRows(i int) { | ||
|
||
} | ||
|
||
// Current implements the Iterator interface. | ||
func (it *iterator4RowPtr) Current() Row { | ||
if it.cursor == 0 || it.cursor > it.Len() { | ||
|
@@ -304,12 +302,3 @@ func (it *iterator4RowPtr) ReachEnd() { | |
func (it *iterator4RowPtr) Len() int { | ||
return len(it.ptrs) | ||
} | ||
|
||
// Copy implements the Iterator interface. | ||
func (it *iterator4RowPtr) Copy() Iterator { | ||
return &iterator4RowPtr{ | ||
li: it.li, | ||
ptrs: it.ptrs, | ||
cursor: it.cursor, | ||
} | ||
} |
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.
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.
What is the use case for this method?