forked from oap-project/velox
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[POAE7-2280] [M2] [Integration] VeloxToSubstrait- support variadic fu…
…nction lookup (oap-project#45) * logical scalar function support & code refactor * method 'loadExtension' should be load once at runtime * revert setup-ubuntu.sh * remove unused methods * code style fix * code style fix * license header fix * merge logical op test into same method
- Loading branch information
1 parent
dc5d08f
commit ea8fc59
Showing
23 changed files
with
1,141 additions
and
1,016 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
/* | ||
* Copyright (c) Facebook, Inc. and its affiliates. | ||
* | ||
* 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 | ||
* | ||
* http://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. | ||
*/ | ||
|
||
#include "velox/substrait/ExprUtils.h" | ||
#include "velox/substrait/SubstraitType.h" | ||
|
||
namespace facebook::velox::substrait { | ||
|
||
SubstraitSignaturePtr toSubstraitSignature( | ||
const core::CallTypedExprPtr& callTypedExpr) { | ||
std::vector<SubstraitTypePtr> types; | ||
types.reserve(callTypedExpr->inputs().size()); | ||
for (const auto& input : callTypedExpr->inputs()) { | ||
types.emplace_back(fromVelox(input->type())); | ||
} | ||
|
||
return SubstraitFunctionSignature::of( | ||
callTypedExpr->name(), types, fromVelox(callTypedExpr->type())); | ||
} | ||
|
||
} // namespace facebook::velox::substrait |
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,29 @@ | ||
/* | ||
* Copyright (c) Facebook, Inc. and its affiliates. | ||
* | ||
* 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 | ||
* | ||
* http://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. | ||
*/ | ||
|
||
#pragma once | ||
|
||
#include "velox/expression/Expr.h" | ||
#include "velox/substrait/SubstraitSignature.h" | ||
#include "velox/substrait/TypeUtils.h" | ||
|
||
namespace facebook::velox::substrait { | ||
|
||
/// convert velox callTyped expression to substrait function signature. | ||
SubstraitSignaturePtr toSubstraitSignature( | ||
const core::CallTypedExprPtr& callTypedExpr); | ||
|
||
} // namespace facebook::velox::substrait |
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.