t8y2/dbx · error
unsupported IoTDB timestamp precision: %s
Error message
unsupported IoTDB timestamp precision: %s
What it means
queryTimestampPrecision asks the server for its timestamp precision and normalizes it via normalizeTimestampPrecision, which accepts only ms, us, or ns. If the server reports anything else, newSessionClient fails with 'unsupported IoTDB timestamp precision: %s'.
Source
Thrown at agents/drivers/iotdb/driver.go:312
}
if !hasNext {
return "", errors.New("IoTDB SHOW VARIABLES did not return TimestampPrecision")
}
variable, err := dataset.GetStringByIndex(variableIndex)
if err != nil {
return "", err
}
if !strings.EqualFold(strings.ReplaceAll(strings.TrimSpace(variable), "_", ""), "TimestampPrecision") {
continue
}
value, err := dataset.GetStringByIndex(valueIndex)
if err != nil {
return "", err
}
if precision := normalizeTimestampPrecision(value); precision != "" {
return precision, nil
}
return "", fmt.Errorf("unsupported IoTDB timestamp precision: %s", value)
}
}
func normalizeTimestampPrecision(value string) string {
switch strings.ToLower(strings.TrimSpace(value)) {
case "ms", "us", "ns":
return strings.ToLower(strings.TrimSpace(value))
default:
return ""
}
}
func (s *sessionClient) Close() error {
if s == nil || s.session == nil {
return nil
}
return s.session.Close()
}View on GitHub (pinned to c0390bff16)
Solutions
- Set the server's timestamp_precision to ms, us, or ns in iotdb-common.properties and restart the server.
- Query the server to see what precision value it reports and compare with the accepted set.
- Align driver and server versions so the reported value is recognized.
- Patch normalizeTimestampPrecision if your server legitimately reports a new precision unit.
Example fix
# before (iotdb-common.properties) timestamp_precision=microsecond # after timestamp_precision=us
Defensive patterns
Strategy: fallback
Try / catch
client, err := newSessionClient(cfg)
if err != nil && strings.Contains(err.Error(), "unsupported IoTDB timestamp precision") {
return fmt.Errorf("server timestamp_precision unsupported; set it to ms/us/ns: %w", err)
} Prevention
- Configure server timestamp_precision as ms, us, or ns in iotdb-common.properties.
- Keep driver and server versions aligned.
- Verify server precision in deployment smoke tests before rollout.
When it happens
Trigger: Connecting to an IoTDB server whose timestamp_precision setting reports an unexpected value (casing/locale variant or a version reporting a precision unit this driver doesn't know).
Common situations: Running against a forked, older, or newer IoTDB build that reports an unknown precision string, or a server configured with a non-standard timestamp_precision value such as 'microsecond'.
Related errors
- unsupported IoTDB SQL dialect: %s
- query session not found: %s
- Hive host is required
- Hive connection string must start with jdbc:hive2:// or hive
- Hive endpoint is empty
AI-assisted analysis of t8y2/dbx@c0390bff16 (2026-09-05).
Data as JSON: /api/errors/7abc965c2aba78ad.
Report an issue: GitHub.