You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: MongoDB external table accepts AUTO_INCREMENT and fails at scan time #27347
MongoDB external-table DDL accepts AUTO_INCREMENT, although the external table contract requires unsupported local sequence attributes to fail closed; scanning then fails at runtime while converting the MongoDB string _id to BIGINT.
CREATE EXTERNAL TABLE ext_bad_ai (
id BIGINT AUTO_INCREMENT MONGODB_PATH '_id'
) ENGINE=MONGODB WITH (
'connection'='valid_connection',
'database'='test_db',
'collection'='events',
'schema_mode'='explicit'
);
SELECT id FROM ext_bad_ai;
The collection contains string _id values.
Actual behavior
The CREATE EXTERNAL TABLE statement succeeds. The subsequent scan fails with ERROR 20301: MongoDB value at path _id cannot be converted to BIGINT.
Expected behavior
Until sequence semantics are explicitly supported for MongoDB external tables, the DDL must be rejected atomically and must not leave a catalog mapping.
Stability and controls
DDL acceptance and runtime behavior reproduced 3/3.
The normal MongoDB external table without AUTO_INCREMENT scans successfully.
No partial rows were observed after the runtime error.
Evidence
TKE terminal output and the test design report record status=0 for creation and the repeated runtime conversion error.
Code analysis
The DDL preserves AUTO_INCREMENT in SHOW CREATE TABLE but the MongoDB scan treats the mapped value as an ordinary BIGINT; exact ownership of the fail-closed validation requires maintainer confirmation.
Regression coverage
Add a DDL regression asserting that AUTO_INCREMENT on a MongoDB external table is rejected and no table/mapping remains.
Activity
Ariznawlll commentedon Aug 23, 2026
已在最新 main(6ff9be9646a6ac43e05ba3063de27b2248bbac62)的 MongoDB connector/endpoint allowlist 配置下验证修复。
验证内容:
该场景需要受控 MongoDB fixture、凭据和服务端 endpoint allowlist。默认 MOTR 环境按安全策略不提供这些依赖,因此不加入会永久失败的 MOTR 用例;应由带 fixture 的 MongoDB 集成/BVT 环境回归。