Skip to content

Commit d7b8fa0

Browse files
authored
fix(native): Enable CudfHiveConnector with PRESTO_ENABLE_CUDF (#26415)
## Description The commit 3705024 missed CudfHiveConnector during refactor. This PR adds it again. ## Motivation and Context <!---Why is this change required? What problem does it solve?--> <!---If it fixes an open issue, please link to the issue here.--> ## Impact <!---Describe any public API or user-facing feature change or any performance impact--> ## Test Plan <!---Please fill in how you tested your change--> ## Contributor checklist - [ ] Please make sure your submission complies with our [contributing guide](https://github.com/prestodb/presto/blob/master/CONTRIBUTING.md), in particular [code style](https://github.com/prestodb/presto/blob/master/CONTRIBUTING.md#code-style) and [commit standards](https://github.com/prestodb/presto/blob/master/CONTRIBUTING.md#commit-standards). - [ ] PR description addresses the issue accurately and concisely. If the change is non-trivial, a GitHub Issue is referenced. - [ ] Documented new properties (with its default value), SQL syntax, functions, or other functionality. - [ ] If release notes are required, they follow the [release notes guidelines](https://github.com/prestodb/presto/wiki/Release-Notes-Guidelines). - [ ] Adequate tests were added if applicable. - [ ] CI passed. - [ ] If adding new dependencies, verified they have an [OpenSSF Scorecard](https://securityscorecards.dev/#the-checks) score of 5.0 or higher (or obtained explicit TSC approval for lower scores). If release note is NOT required, use: ``` == NO RELEASE NOTE == ``` Co-authored-by: Karthikeyan Natarajan <[email protected]>
1 parent 60a82c0 commit d7b8fa0

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

presto-native-execution/presto_cpp/main/connectors/Registration.cpp

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
* limitations under the License.
1313
*/
1414
#include "presto_cpp/main/connectors/Registration.h"
15-
#include "presto_cpp/main/connectors/IcebergPrestoToVeloxConnector.h"
1615
#include "presto_cpp/main/connectors/HivePrestoToVeloxConnector.h"
16+
#include "presto_cpp/main/connectors/IcebergPrestoToVeloxConnector.h"
1717
#include "presto_cpp/main/connectors/SystemConnector.h"
1818

1919
#ifdef PRESTO_ENABLE_ARROW_FLIGHT_CONNECTOR
@@ -91,6 +91,21 @@ void registerConnectorFactories() {
9191
facebook::presto::registerConnectorFactory(
9292
std::make_shared<facebook::velox::connector::hive::HiveConnectorFactory>(
9393
kHiveHadoop2ConnectorName));
94+
#ifdef PRESTO_ENABLE_CUDF
95+
facebook::presto::unregisterConnectorFactory(
96+
facebook::velox::connector::hive::HiveConnectorFactory::kHiveConnectorName);
97+
facebook::presto::unregisterConnectorFactory(kHiveHadoop2ConnectorName);
98+
99+
// Register cuDF Hive connector factory
100+
facebook::presto::registerConnectorFactory(
101+
std::make_shared<facebook::velox::cudf_velox::connector::hive::
102+
CudfHiveConnectorFactory>());
103+
104+
// Register cudf Hive connector factory
105+
facebook::presto::registerConnectorFactory(
106+
std::make_shared<facebook::velox::cudf_velox::connector::hive::
107+
CudfHiveConnectorFactory>(kHiveHadoop2ConnectorName));
108+
#endif
94109

95110
// Register TPC-DS connector factory
96111
facebook::presto::registerConnectorFactory(

0 commit comments

Comments
 (0)