Skip to content

Commit

Permalink
rebase to 2023/3/29
Browse files Browse the repository at this point in the history
  • Loading branch information
zhejiangxiaomai committed Mar 31, 2023
1 parent d9cdd5d commit 8db85d6
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 11 deletions.
8 changes: 4 additions & 4 deletions velox/exec/Task.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -821,10 +821,10 @@ void Task::removeDriver(std::shared_ptr<Task> self, Driver* driver) {
}

if (self->numFinishedDrivers_ == self->numTotalDrivers_) {
LOG(INFO) << "All drivers (" << self->numFinishedDrivers_
/*LOG(INFO) << "All drivers (" << self->numFinishedDrivers_
<< ") finished for task " << self->taskId()
<< " after running for " << self->timeSinceStartMsLocked()
<< " ms.";
<< " ms.";*/
}
}

Expand Down Expand Up @@ -1470,9 +1470,9 @@ ContinueFuture Task::terminate(TaskState terminalState) {
}
}

LOG(INFO) << "Terminating task " << taskId() << " with state "
/*LOG(INFO) << "Terminating task " << taskId() << " with state "
<< taskStateString(state_) << " after running for "
<< timeSinceStartMsLocked() << " ms.";
<< timeSinceStartMsLocked() << " ms.";*/

activateTaskCompletionNotifier(completionNotifier);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,6 @@ void registerSimpleFunctions(const std::string& prefix) {
registerFunction<YearFunction, int32_t, Date>({prefix + "year"});
registerFunction<YearFunction, int32_t, TimestampWithTimezone>(
{prefix + "year"});
registerFunction<YearFunction, int64_t, Timestamp>({prefix + "year"});
registerFunction<YearFunction, int64_t, Date>({prefix + "year"});
registerFunction<YearFunction, int64_t, TimestampWithTimezone>(
{prefix + "year"});
registerFunction<WeekFunction, int64_t, Timestamp>(
{prefix + "week", prefix + "week_of_year"});
registerFunction<WeekFunction, int64_t, Date>(
Expand Down
4 changes: 2 additions & 2 deletions velox/functions/sparksql/MightContain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class BloomFilterMightContainFunction final : public exec::VectorFunction {
HashStringAllocator allocator{context.pool()};
if (serialized->isConstantMapping()) {
BloomFilter output{StlAllocator<uint64_t>(&allocator)};
output.merge(serialized->valueAt<StringView>(0).data());
output.merge(serialized->valueAt<StringView>(0).str().c_str());
rows.applyToSelected([&](int row) {
auto contain = output.mayContain(
folly::hasher<int64_t>()(value->valueAt<int64_t>(row)));
Expand All @@ -58,7 +58,7 @@ class BloomFilterMightContainFunction final : public exec::VectorFunction {

rows.applyToSelected([&](int row) {
BloomFilter output{StlAllocator<uint64_t>(&allocator)};
output.merge(serialized->valueAt<StringView>(0).data());
output.merge(serialized->valueAt<StringView>(0).str().c_str());
auto contain = output.mayContain(
folly::hasher<int64_t>()(value->valueAt<int64_t>(row)));
result.set(row, contain);
Expand Down
3 changes: 3 additions & 0 deletions velox/functions/sparksql/Register.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ static void workAroundRegistrationMacro(const std::string& prefix) {
udf_array_intersect, prefix + "array_intersect");
// This is the semantics of spark.sql.ansi.enabled = false.
VELOX_REGISTER_VECTOR_FUNCTION(udf_element_at, prefix + "element_at");
VELOX_REGISTER_VECTOR_FUNCTION(udf_concat_row, prefix + "named_struct");
VELOX_REGISTER_VECTOR_FUNCTION(
udf_map_allow_duplicates, prefix + "map_from_arrays");
// String functions.
Expand Down Expand Up @@ -117,6 +118,8 @@ void registerFunctions(const std::string& prefix) {
prefix + "greatest", greatestSignatures(), makeGreatest);
exec::registerStatefulVectorFunction(
prefix + "hash", hashSignatures(), makeHash);
exec::registerStatefulVectorFunction(
prefix + "murmur3hash", hashSignatures(), makeHash);
exec::registerStatefulVectorFunction(
prefix + "xxhash64", xxhash64Signatures(), makeXxHash64);
VELOX_REGISTER_VECTOR_FUNCTION(udf_map, prefix + "map");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,8 @@ class BloomFilterAggAggregate : public exec::Aggregate {
continue;
}
if (StringView::isInline(size)) {
StringView serialized(size);
char buffer[StringView::kInlineSize];
StringView serialized = StringView(buffer, size);
accumulator->serialize(serialized);
flatResult->setNoCopy(i, serialized);
} else {
Expand Down

0 comments on commit 8db85d6

Please sign in to comment.