diff --git a/velox/functions/sparksql/Hash.cpp b/velox/functions/sparksql/Hash.cpp index 39e6a0cade356..3ca8e29906fa0 100644 --- a/velox/functions/sparksql/Hash.cpp +++ b/velox/functions/sparksql/Hash.cpp @@ -386,33 +386,9 @@ std::vector> hashSignatures() { .build()}; } -void checkInputType(const std::vector& inputArgs) { - for (int i = 0; i < inputArgs.size(); i++) { - switch (inputArgs[i].type->kind()) { - case TypeKind::BOOLEAN: - case TypeKind::TINYINT: - case TypeKind::SMALLINT: - case TypeKind::INTEGER: - case TypeKind::BIGINT: - case TypeKind::VARCHAR: - case TypeKind::VARBINARY: - case TypeKind::REAL: - case TypeKind::DOUBLE: - case TypeKind::DATE: - case TypeKind::HUGEINT: - case TypeKind::TIMESTAMP: - break; - default: - VELOX_USER_FAIL( - "Unsupported type for hash: {}", inputArgs[i].type->toString()) - } - } -} - std::shared_ptr makeHash( const std::string& name, const std::vector& inputArgs) { - checkInputType(inputArgs); static const auto kHashFunction = std::make_shared(); return kHashFunction; } @@ -435,7 +411,6 @@ std::vector> xxhash64Signatures() { std::shared_ptr makeXxHash64( const std::string& name, const std::vector& inputArgs) { - checkInputType(inputArgs); static const auto kXxHash64Function = std::make_shared(); return kXxHash64Function; }