Comments (6)
Thanks.
Do you have some suggestions? Or would you like to create a pull request?
from miniob.
Thanks. Do you have some suggestions? Or would you like to create a pull request?
To minimize code structure modifications as much as possible, my current solution is to add a boolean property called idx_need_increase_
within the IndexScanPhysicalOperator
class, with a default value of true. I would also provide methods set_idx_need_increase()
and get_idx_need_increase()
. In the DeletePhysicalOperator::next()
function, if the record deletion is successful, I would attempt to cast the PhysicalOperator* child
into an IndexScanPhysicalOperator*
. If the casting is successful, I would then call set_idx_need_increase()
to set it to false. In the next_entry()
function, I would use the provided idx_need_increase
parameter to decide whether to perform the iter_index_++
operation.
If you think this approach is feasible, I can submit a pull request (PR), or you can provide me with some suggestions.
from miniob.
Thanks for your suggestion. It looks not a perfect solution.
- Your solution only suit for
deletion
and cannot used in insertion scenario - Cast the child to specific type is not a generic method.
Do you know the method that some real-database uses, such as mysql, postgresql?
And it also looked like std::iterator with insert/delete.
from miniob.
Do you mean that, similar to using erase()
for deleting elements in a vector
, it returns a valid iterator? I'm not very familiar with how MySQL/PostgreSQL implement this feature. Could you provide me with some keywords so that I can try to implement this solution?
from miniob.
std::iterator cannot deal with erase or insert correctly.
I'm sorry that I am not familiar with mysql/postgresql too and I cannot provide any useful information too.
I will trace this issue and if you have any other ideas, discussion is welcome.
from miniob.
Is it possible to fix this bug? The test samples in the competition involve this issue, and it won't pass the test if it's not fixed.
from miniob.
Related Issues (20)
- docker拉取镜像太慢 HOT 2
- 线程模型支持协程
- 添加 '#include<cstdint>' 到 common/types.h第一行 HOT 3
- ASAN 与 内存池结合的问题
- [BUG]日志文件中打印出来的栈信息不能使用addr2line识别 HOT 2
- support memory usage monitor
- 编译后无法启动miniob HOT 2
- Apple M1 编译报错 HOT 3
- [BUG]构建的Docker开发容器无法使用root密码登录 HOT 1
- [BUG] 某处代码 Use-After-Free HOT 1
- 添加RowCount统计信息
- [BUG]vscode执行init任务失败 HOT 10
- [BUG] sysbench-test failed with `-DENABLE_ASAN=OFF`
- [BUG] sysbench-test is instability, sometimes coredump
- PAX storage format task
- aggregation and group by task
- vectorization engine task
- A question about the feature about updateing,deleting and changing index HOT 6
- About the using of class SessionStage HOT 2
- MVCC HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from miniob.