apache/seatunnel · info
Skip analyze, approximateRowCntStatement
Error message
Skip analyze, approximateRowCntStatement: {} What it means
Info/warn log in YashanDbDialect.approximateRowCntStatement indicating the ANALYZE TABLE step for row-count estimation was skipped because the table config has skipAnalyze=true. Splitting then relies on a plain COUNT(*) query instead of optimizer statistics. It is not an error; the job continues.
Solutions
- No action needed if skipping is intentional; the COUNT-based row estimate still runs.
- Remove skipAnalyze=true from the table options if you want faster/more accurate split estimation.
- If ANALYZE is undesired globally, tune split size explicitly (query-based splitting config) instead.
Example fix
// before partition_column-analyze=true (analyze enabled) // after (skip analyze) table-path = "db.tbl" skip_analyze = true
Defensive patterns
Strategy: validation
Validate before calling
// ensure skipAnalyze is intentional
boolean skip = tableOptions.getSkipAnalyze();
if (!skip) log.info("ANALYZE will run for {}", tablePath); Prevention
- Only set skipAnalyze=true when ANALYZE privileges/locking are a concern
- Prefer explicit split size config when skipping analyze on huge tables
- Confirm the COUNT(*) fallback meets your split-accuracy needs
When it happens
Trigger: JDBC source read from YashanDB where the table options set skipAnalyze=true, so `analyze table ... compute statistics for table` is not executed before the row-count query.
Common situations: Users disabling analyze to avoid locking or stats overhead on large/production tables during split enumeration; ops teams restricting ANALYZE privileges.
Related errors
- Column not found in table
- COMMON-17
- COMMON-19
- Invalid YashanDB 2-byte vector buffer length:
- No result returned after running query
AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10).
Data as JSON: /api/errors/800468f5fd141435.
Report an issue: GitHub.
Appendix: source
Thrown at seatunnel-connectors-v2/connector-jdbc/src/main/java/org/apache/seatunnel/connectors/seatunnel/jdbc/internal/dialect/yashandb/YashanDbDialect.java:233
}
}
if (useTableStats) {
TablePath tablePath = table.getTablePath();
String rowCountQuery =
String.format(
"select NUM_ROWS from all_tables where OWNER = '%s' AND TABLE_NAME = '%s' ",
tablePath.getSchemaName(), tablePath.getTableName());
try (Statement stmt = connection.createStatement()) {
String analyzeTable =
String.format(
"analyze table %s compute statistics for table",
tableIdentifier(tablePath));
if (!table.getSkipAnalyze()) {
log.info("Split Chunk, approximateRowCntStatement: {}", analyzeTable);
stmt.execute(analyzeTable);
} else {
log.warn("Skip analyze, approximateRowCntStatement: {}", analyzeTable);
}
log.info("Split Chunk, approximateRowCntStatement: {}", rowCountQuery);
try (ResultSet rs = stmt.executeQuery(rowCountQuery)) {
if (!rs.next()) {
throw new SQLException(
String.format(
"No result returned after running query [%s]",
rowCountQuery));
}
return rs.getLong(1);
}
}
}
return SQLUtils.countForSubquery(connection, query);
}
@Override
public Object queryNextChunkMax(View on GitHub (pinned to cf67b549a7)