Skip to content

Commit

Permalink
Remove unused method
Browse files Browse the repository at this point in the history
LIKE pattern is not currently allowed to be of `char` type.
  • Loading branch information
findepi authored and losipiuk committed Jun 25, 2021
1 parent c7c47c8 commit ddea70a
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -96,14 +96,6 @@ public static JoniRegexp likePattern(@SqlType("varchar(x)") Slice pattern)
return compileLikePattern(pattern);
}

@ScalarFunction(value = LIKE_PATTERN_FUNCTION_NAME, hidden = true)
@LiteralParameters("x")
@SqlType(LikePatternType.NAME)
public static JoniRegexp likePattern(@LiteralParameter("x") Long charLength, @SqlType("char(x)") Slice pattern)
{
return compileLikePattern(padSpaces(pattern, charLength.intValue()));
}

public static JoniRegexp compileLikePattern(Slice pattern)
{
return likePattern(pattern.toStringUtf8(), '0', false);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,6 @@ public void testLikeSpacesInPattern()
JoniRegexp regex = LikeFunctions.compileLikePattern(utf8Slice("ala "));
assertTrue(likeVarchar(utf8Slice("ala "), regex));
assertFalse(likeVarchar(utf8Slice("ala"), regex));

regex = LikeFunctions.likePattern(5L, utf8Slice("ala"));
assertTrue(likeVarchar(utf8Slice("ala "), regex));
assertFalse(likeVarchar(utf8Slice("ala"), regex));
}

@Test
Expand Down

0 comments on commit ddea70a

Please sign in to comment.