Skip to content
This repository was archived by the owner on Dec 18, 2025. It is now read-only.

Commit 02c2a1e

Browse files
committed
fix
1 parent 5adb39b commit 02c2a1e

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

src/observer/sql/operator/table_scan_physical_operator.h

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,24 @@ class Table;
3232
class TableScanPhysicalOperator : public PhysicalOperator
3333
{
3434
public:
35-
TableScanPhysicalOperator(Table *table, ReadWriteMode mode) : table_(table), mode_(mode) {}
35+
TableScanPhysicalOperator(Table *table, ReadWriteMode mode) : table_(table), mode_(mode)
36+
{
37+
record_scanner_ = new RecordFileScanner();
38+
}
3639

3740
TableScanPhysicalOperator(Table *table, std::string alias, ReadWriteMode mode) : table_(table), mode_(mode)
3841
{
42+
record_scanner_ = new RecordFileScanner();
3943
tuple_.set_table_alias(alias);
4044
}
4145

42-
~TableScanPhysicalOperator() override = default;
46+
~TableScanPhysicalOperator() override
47+
{
48+
if (record_scanner_ != nullptr) {
49+
delete record_scanner_;
50+
record_scanner_ = nullptr;
51+
}
52+
}
4353

4454
string param() const override;
4555

0 commit comments

Comments
 (0)