diff --git a/velox/exec/Task.cpp b/velox/exec/Task.cpp index a2d7041b0696..2a59bdd8b033 100644 --- a/velox/exec/Task.cpp +++ b/velox/exec/Task.cpp @@ -821,10 +821,10 @@ void Task::removeDriver(std::shared_ptr 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.";*/ } } @@ -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); diff --git a/velox/functions/prestosql/registration/DateTimeFunctionsRegistration.cpp b/velox/functions/prestosql/registration/DateTimeFunctionsRegistration.cpp index 4d3fb44d35cf..6cc1fdbf3cf6 100644 --- a/velox/functions/prestosql/registration/DateTimeFunctionsRegistration.cpp +++ b/velox/functions/prestosql/registration/DateTimeFunctionsRegistration.cpp @@ -32,10 +32,6 @@ void registerSimpleFunctions(const std::string& prefix) { registerFunction({prefix + "year"}); registerFunction( {prefix + "year"}); - registerFunction({prefix + "year"}); - registerFunction({prefix + "year"}); - registerFunction( - {prefix + "year"}); registerFunction( {prefix + "week", prefix + "week_of_year"}); registerFunction( diff --git a/velox/functions/sparksql/MightContain.cpp b/velox/functions/sparksql/MightContain.cpp index 8fa26b091f90..f105b547cfd0 100644 --- a/velox/functions/sparksql/MightContain.cpp +++ b/velox/functions/sparksql/MightContain.cpp @@ -47,7 +47,7 @@ class BloomFilterMightContainFunction final : public exec::VectorFunction { HashStringAllocator allocator{context.pool()}; if (serialized->isConstantMapping()) { BloomFilter output{StlAllocator(&allocator)}; - output.merge(serialized->valueAt(0).data()); + output.merge(serialized->valueAt(0).str().c_str()); rows.applyToSelected([&](int row) { auto contain = output.mayContain( folly::hasher()(value->valueAt(row))); @@ -58,7 +58,7 @@ class BloomFilterMightContainFunction final : public exec::VectorFunction { rows.applyToSelected([&](int row) { BloomFilter output{StlAllocator(&allocator)}; - output.merge(serialized->valueAt(0).data()); + output.merge(serialized->valueAt(0).str().c_str()); auto contain = output.mayContain( folly::hasher()(value->valueAt(row))); result.set(row, contain); diff --git a/velox/functions/sparksql/Register.cpp b/velox/functions/sparksql/Register.cpp index 52c0dfa3ad20..d9eb29e59aef 100644 --- a/velox/functions/sparksql/Register.cpp +++ b/velox/functions/sparksql/Register.cpp @@ -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. @@ -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"); diff --git a/velox/functions/sparksql/aggregates/BloomFilterAggAggregate.cpp b/velox/functions/sparksql/aggregates/BloomFilterAggAggregate.cpp index 00d909972958..beeb22d65e1c 100644 --- a/velox/functions/sparksql/aggregates/BloomFilterAggAggregate.cpp +++ b/velox/functions/sparksql/aggregates/BloomFilterAggAggregate.cpp @@ -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 {