Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fixed
Browse files Browse the repository at this point in the history
amorynan committed Dec 12, 2024
1 parent 370c175 commit 0c83421
Showing 2 changed files with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -89,15 +89,13 @@ private static long parseIPv4toLong(String ipv4) {

private static String parseLongToIPv4(long ipv4) {
StringBuilder sb = new StringBuilder();
sb.append("\"");
for (int i = 3; i >= 0; i--) {
short octet = (short) ((ipv4 >> (i * 8)) & 0xFF);
sb.append(octet);
if (i > 0) {
sb.append(".");
}
}
sb.append("\"");
return sb.toString();
}

@@ -117,7 +115,7 @@ public Expr clone() {

@Override
protected String toSqlImpl() {
return getStringValue();
return "\"" + getStringValue() + "\"";
}

@Override
Original file line number Diff line number Diff line change
@@ -75,7 +75,7 @@ private void checkValueValid(String ipv6) throws AnalysisException {

@Override
protected String toSqlImpl() {
return getStringValue();
return "\"" + getStringValue() + "\"";
}

@Override
@@ -101,7 +101,7 @@ public int compareLiteral(LiteralExpr expr) {

@Override
public String getStringValue() {
return "\"" + this.value + "\"";
return this.value;
}

@Override

0 comments on commit 0c83421

Please sign in to comment.