{"record":{"id":"3b3e8f5b4e4f3bdf","repo":"MyCATApache/Mycat-Server","slug":"endvalue-endvalue-please-check-if-the-format-sat","errorCode":null,"errorMessage":"endValue:{endValue} Please check if the format satisfied.","messagePattern":"endValue:(.+?) Please check if the format satisfied\\.","errorType":"exception","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"src/main/java/io/mycat/route/function/PartitionByHotDate.java","lineNumber":133,"sourceCode":"\t\t\t\t\tif(hasLimit){\n\t\t\t\t\t\tre = new Integer[len+1];\n\t\t\t\t\t\tre[0] = 0;\n\t\t\t\t\t\tfor(int i =0;i<len;i++){\n\t\t\t\t\t\t\tre[i+1]=begin+i;\n\t\t\t\t\t\t}\n\t\t\t\t\t}else{\n\t\t\t\t\t\tre = new Integer[len];\n\t\t\t\t\t\tfor(int i=0;i<len;i++){\n\t\t\t\t\t\t\tre[i]=begin+i;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\treturn re;\n\t\t\t\t}else{\n\t\t\t\t\treturn re;\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (ParseException e) {\n\t\t\tthrow new IllegalArgumentException(new StringBuilder().append(\"endValue:\").append(endValue).append(\" Please check if the format satisfied.\").toString(),e);\n\t\t}\n\t\treturn targetPartition;\n\t}\n\n\tpublic void setsPartionDay(String sPartionDay) {\n\t\tthis.sPartionDay = sPartionDay;\n\t}\n\tpublic void setDateFormat(String dateFormat) {\n\t\tthis.dateFormat = dateFormat;\n\t}\n\tpublic String getsLastDay() {\n\t\treturn sLastDay;\n\t}\n\tpublic void setsLastDay(String sLastDay) {\n\t\tthis.sLastDay = sLastDay;\n\t}\n}\n","sourceCodeStart":115,"sourceCodeEnd":151,"githubUrl":"https://github.com/MyCATApache/Mycat-Server/blob/65f8d8beb752f935752f2a0eec0ab017facab9ef/src/main/java/io/mycat/route/function/PartitionByHotDate.java#L115-L151","documentation":"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.","triggerScenarios":"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.","commonSituations":"Range queries where end is supplied as 'now', a timestamp with milliseconds, or a different format than beginValue; query builders serializing dates inconsistently.","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."],"exampleFix":"// before\nalgorithm.calculateRange(\"2024-01-01\", \"2024/02/01\");\n// after\nalgorithm.calculateRange(\"2024-01-01\", \"2024-02-01\");","handlingStrategy":"validation","validationCode":"boolean valid;\ntry {\n  new java.text.SimpleDateFormat(dateFormat).parse(endValue);\n  valid = true;\n} catch (java.text.ParseException e) { valid = false; }\n","typeGuard":null,"tryCatchPattern":"try {\n    Integer[] nodes = partitionByHotDate.calculateRange(beginValue, endValue);\n} catch (IllegalArgumentException e) {\n    // message names endValue specifically; re-format end boundary and retry once\n}","preventionTips":["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"],"tags":["sharding","date-format","range-query"],"backgroundTag":"invalid-date-format","analyzedSha":"65f8d8beb752f935752f2a0eec0ab017facab9ef","analyzedAt":"2026-09-11T00:12:21.696Z","contentChangedAt":"2026-09-11T00:12:21.696Z","schemaVersion":2},"datasetVersion":"2026-09-16T04:17:20.429Z"}