MyCATApache/Mycat-Server · error · IllegalArgumentException
endValue: Please check if the format satisfied.
Error message
endValue:{endValue} Please check if the format satisfied. What it means
PartitionByHotDate.calculateRange() parses the endValue of a range query as a date. When that parse throws ParseException, this IllegalArgumentException naming endValue is thrown. It only affects range-based routing (beginValue/endValue), unlike error 224 which names the single columnValue.
Solutions
- Format endValue using the same pattern as the dateFormat property.
- Ensure both beginValue and endValue share one consistent format.
- Validate the end date in the query layer before issuing the range query.
Example fix
// before
algorithm.calculateRange("2024-01-01", "2024/02/01");
// after
algorithm.calculateRange("2024-01-01", "2024-02-01"); Defensive patterns
Strategy: validation
Validate before calling
boolean valid;
try {
new java.text.SimpleDateFormat(dateFormat).parse(endValue);
valid = true;
} catch (java.text.ParseException e) { valid = false; }
Try / catch
try {
Integer[] nodes = partitionByHotDate.calculateRange(beginValue, endValue);
} catch (IllegalArgumentException e) {
// message names endValue specifically; re-format end boundary and retry once
} Prevention
- Serialize both range bounds with the same formatter
- Never pass human-input date text directly as endValue
- Prefer DATE/TIME SQL types over strings for range columns
When it happens
Trigger: Calling calculateRange(beginValue, endValue) (e.g. for BETWEEN queries via test()) where endValue is not parseable with the configured dateFormat: wrong pattern, empty, or non-date text.
Common situations: Range queries where end is supplied as 'now', a timestamp with milliseconds, or a different format than beginValue; query builders serializing dates inconsistently.
Related errors
- columnValue: Please check if the format satisfied.
- columnValue: Please check if the format satisfied.
- columnValue: Please check if the format satisfied.
- columnValue: Please check if the format satisfied.
- columnValue: Please check if the format satisfied.
AI-assisted analysis of MyCATApache/Mycat-Server@65f8d8beb7 (2026-09-11).
Data as JSON: /api/errors/3b3e8f5b4e4f3bdf.
Report an issue: GitHub.
Appendix: source
Thrown at src/main/java/io/mycat/route/function/PartitionByHotDate.java:133
if(hasLimit){
re = new Integer[len+1];
re[0] = 0;
for(int i =0;i<len;i++){
re[i+1]=begin+i;
}
}else{
re = new Integer[len];
for(int i=0;i<len;i++){
re[i]=begin+i;
}
}
return re;
}else{
return re;
}
}
} catch (ParseException e) {
throw new IllegalArgumentException(new StringBuilder().append("endValue:").append(endValue).append(" Please check if the format satisfied.").toString(),e);
}
return targetPartition;
}
public void setsPartionDay(String sPartionDay) {
this.sPartionDay = sPartionDay;
}
public void setDateFormat(String dateFormat) {
this.dateFormat = dateFormat;
}
public String getsLastDay() {
return sLastDay;
}
public void setsLastDay(String sLastDay) {
this.sLastDay = sLastDay;
}
}
View on GitHub (pinned to 65f8d8beb7)