Skip to content

Commit

Permalink
fix sanitize(type) in FuzzerUtil for IPPREFIX type
Browse files Browse the repository at this point in the history
  • Loading branch information
kagamiori committed Dec 12, 2024
1 parent d9a6012 commit c713ab0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
3 changes: 2 additions & 1 deletion velox/exec/fuzzer/FuzzerUtil.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
#include "velox/dwio/catalog/fbhive/FileUtils.h"
#include "velox/dwio/dwrf/writer/Writer.h"
#include "velox/expression/SignatureBinder.h"
#include "velox/functions/prestosql/types/IPPrefixType.h"

using namespace facebook::velox::dwio::catalog::fbhive;

Expand Down Expand Up @@ -283,7 +284,7 @@ bool usesTypeName(
// If 'type' is a RowType or contains RowTypes with empty field names, adds
// default names to these fields in the RowTypes.
TypePtr sanitize(const TypePtr& type) {
if (!type) {
if (!type || isIPPrefixType(type)) {
return type;
}

Expand Down
1 change: 0 additions & 1 deletion velox/expression/fuzzer/ExpressionFuzzer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -664,7 +664,6 @@ bool ExpressionFuzzer::isSupportedSignature(
if (usesTypeName(signature, "opaque") ||
usesTypeName(signature, "timestamp with time zone") ||
usesTypeName(signature, "interval day to second") ||
usesTypeName(signature, "ipprefix") ||
(!options_.enableDecimalType && usesTypeName(signature, "decimal")) ||
(!options_.enableComplexTypes && useComplexType) ||
(options_.enableComplexTypes && usesTypeName(signature, "unknown"))) {
Expand Down

0 comments on commit c713ab0

Please sign in to comment.