-
Notifications
You must be signed in to change notification settings - Fork 278
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
### What problem does this PR solve? 1. Unnest syntax 2. Logical plan node 3. Physical plan node ### Type of change - [x] New Feature (non-breaking change which adds functionality) --------- Signed-off-by: Jin Hai <[email protected]>
- Loading branch information
Showing
31 changed files
with
3,516 additions
and
2,953 deletions.
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
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 |
---|---|---|
@@ -0,0 +1,48 @@ | ||
// Copyright(C) 2024 InfiniFlow, Inc. All rights reserved. | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// https://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
module; | ||
|
||
module physical_unnest; | ||
|
||
import stl; | ||
import txn; | ||
import query_context; | ||
import table_def; | ||
import data_table; | ||
|
||
import physical_operator_type; | ||
import operator_state; | ||
import expression_state; | ||
import expression_selector; | ||
import data_block; | ||
import logger; | ||
import third_party; | ||
|
||
import infinity_exception; | ||
|
||
namespace infinity { | ||
|
||
void PhysicalUnnest::Init() { | ||
} | ||
|
||
bool PhysicalUnnest::Execute(QueryContext *, OperatorState *operator_state) { | ||
OperatorState* prev_op_state = operator_state->prev_op_state_; | ||
if (prev_op_state->Complete()) { | ||
operator_state->SetComplete(); | ||
} | ||
return true; | ||
} | ||
|
||
} // namespace infinity |
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 |
---|---|---|
@@ -0,0 +1,62 @@ | ||
// Copyright(C) 2024 InfiniFlow, Inc. All rights reserved. | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// https://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
module; | ||
|
||
export module physical_unnest; | ||
|
||
import stl; | ||
|
||
import query_context; | ||
import operator_state; | ||
import physical_operator; | ||
import physical_operator_type; | ||
import base_expression; | ||
import data_table; | ||
import load_meta; | ||
import infinity_exception; | ||
import internal_types; | ||
import data_type; | ||
|
||
namespace infinity { | ||
|
||
export class PhysicalUnnest : public PhysicalOperator { | ||
public: | ||
explicit PhysicalUnnest(u64 id, | ||
UniquePtr<PhysicalOperator> left, | ||
Vector<SharedPtr<BaseExpression>> expression_list, | ||
SharedPtr<Vector<LoadMeta>> load_metas) | ||
: PhysicalOperator(PhysicalOperatorType::kUnnest, std::move(left), nullptr, id, load_metas), expression_list_(std::move(expression_list)) {} | ||
|
||
~PhysicalUnnest() override = default; | ||
|
||
void Init() override; | ||
|
||
bool Execute(QueryContext *query_context, OperatorState *operator_state) final; | ||
|
||
inline SharedPtr<Vector<String>> GetOutputNames() const final { return PhysicalCommonFunctionUsingLoadMeta::GetOutputNames(*this); } | ||
|
||
inline SharedPtr<Vector<SharedPtr<DataType>>> GetOutputTypes() const final { return PhysicalCommonFunctionUsingLoadMeta::GetOutputTypes(*this); } | ||
|
||
SizeT TaskletCount() override { return left_->TaskletCount(); } | ||
|
||
Vector<SharedPtr<BaseExpression>> expression_list() const { return expression_list_; } | ||
|
||
private: | ||
Vector<SharedPtr<BaseExpression>> expression_list_; | ||
|
||
SharedPtr<DataTable> input_table_{}; | ||
}; | ||
|
||
} // namespace infinity |
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
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
Oops, something went wrong.