Skip to content
This repository has been archived by the owner on Sep 18, 2023. It is now read-only.

Commit

Permalink
Fix native ut issue
Browse files Browse the repository at this point in the history
  • Loading branch information
PHILO-HE committed Sep 28, 2022
1 parent 0f68a72 commit 49bfec0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
11 changes: 7 additions & 4 deletions native-sql-engine/cpp/src/codegen/arrow_compute/expr_visitor.cc
Original file line number Diff line number Diff line change
Expand Up @@ -491,10 +491,13 @@ arrow::Status ExprVisitor::MakeExprVisitorImpl(
partition_fields.push_back(field->field());
}
std::vector<gandiva::FieldPtr> order_fields;
for (std::shared_ptr<gandiva::Node> child : order_spec->children()) {
std::shared_ptr<gandiva::FieldNode> field =
std::dynamic_pointer_cast<gandiva::FieldNode>(child);
order_fields.push_back(field->field());
// order_spec is not required for all window functions. It can be null.
if (order_spec != nullptr) {
for (std::shared_ptr<gandiva::Node> child : order_spec->children()) {
std::shared_ptr<gandiva::FieldNode> field =
std::dynamic_pointer_cast<gandiva::FieldNode>(child);
order_fields.push_back(field->field());
}
}

std::vector<std::shared_ptr<arrow::DataType>> return_types;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -651,8 +651,7 @@ arrow::Status WindowLagKernel::Finish(ArrayList* out) {
sorted_partitions.push_back(std::move(sorted_partition));
}

////// The above is almost as same as Rank's except using sort (order by) input for
///sorter. ////////
// The above is almost as same as Rank's except using sort (order by) input for sorter. //

#define PROCESS_SUPPORTED_COMMON_TYPES_LAG(PROC) \
PROC(arrow::UInt8Type, arrow::UInt8Builder, arrow::UInt8Array) \
Expand Down

0 comments on commit 49bfec0

Please sign in to comment.