File tree Expand file tree Collapse file tree 1 file changed +15
-1
lines changed
presto-native-execution/presto_cpp/main/types Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -75,6 +75,19 @@ RowTypePtr toRowType(
7575 return ROW (std::move (names), std::move (types));
7676}
7777
78+ RowTypePtr toRowType (
79+ const std::vector<protocol::VariableReferenceExpression>& variables,
80+ const std::vector<TypePtr>& types) {
81+ // VELOX_CHECK_EQ(types.size(), variables.size());
82+ std::vector<std::string> names;
83+ names.reserve (variables.size ());
84+ for (const auto & variable : variables) {
85+ names.emplace_back (variable.name );
86+ }
87+
88+ return ROW (std::move (names), std::move (types));
89+ }
90+
7891std::shared_ptr<connector::ColumnHandle> toColumnHandle (
7992 const protocol::ColumnHandle* column,
8093 const TypeParser& typeParser) {
@@ -1526,9 +1539,10 @@ VeloxQueryPlanConverterBase::toVeloxQueryPlan(
15261539 sourceVeloxPlan,
15271540 tableWriteInfo,
15281541 taskId);
1542+ auto tableTypes = insertTableHandle->connectorInsertTableHandle ()->getColumnHandleDataTypes ();
15291543 return std::make_shared<core::TableWriteNode>(
15301544 node->id ,
1531- toRowType (node->columns , typeParser_ ),
1545+ toRowType (node->columns , tableTypes ),
15321546 node->columnNames ,
15331547 columnStatsSpec,
15341548 std::move (insertTableHandle),
You can’t perform that action at this time.
0 commit comments