{"record":{"id":"789a853a0efc0c4a","repo":"apache/iceberg","slug":"can-t-handle","errorCode":null,"errorMessage":"Can't handle ","messagePattern":"Can't handle ","errorType":"exception","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"orc/src/main/java/org/apache/iceberg/orc/EstimateOrcAvgWidthVisitor.java","lineNumber":76,"sourceCode":"      case SHORT:\n      case INT:\n      case FLOAT:\n      case BOOLEAN:\n      case LONG:\n      case DOUBLE:\n      case DATE:\n        return 8;\n      case TIMESTAMP:\n      case TIMESTAMP_INSTANT:\n        return 12;\n      case STRING:\n      case VARCHAR:\n      case BINARY:\n        return 128;\n      case DECIMAL:\n        return primitive.getPrecision() + 2;\n      default:\n        throw new IllegalArgumentException(\"Can't handle \" + primitive);\n    }\n  }\n}\n","sourceCodeStart":58,"sourceCodeEnd":80,"githubUrl":"https://github.com/apache/iceberg/blob/86d9c8fc543e7c56c9f624eb725f76c9baff9570/orc/src/main/java/org/apache/iceberg/orc/EstimateOrcAvgWidthVisitor.java#L58-L80","documentation":"EstimateOrcAvgWidthVisitor.primitive() estimates average column width for ORC pushdown planning and supports only a fixed set of primitive categories; for any unsupported primitive it throws IllegalArgumentException(\"Can't handle \" + type), because no width estimate exists.","triggerScenarios":"Scan planning/filter pushdown on an ORC table whose schema contains a primitive type the estimator lacks a case for (e.g., certain date/time or newly added types).","commonSituations":"Using predicates pushdown with newer Iceberg types against older ORC module code; exotic ORC file types; reading files written by other engines with unusual type mapping.","solutions":["Upgrade Iceberg so the estimator supports the column type.","Change the column type to a supported primitive (e.g., string/binary/decimal).","Disable filter pushdown for the scan/table if the estimator path is avoidable.","Rewrite the data files with supported types."],"exampleFix":"// before\nTypes.TimestampNanoType.get() // unsupported by estimator -> Can't handle\n// after\nALTER TABLE ... ALTER COLUMN ts TYPE TIMESTAMP; // supported type","handlingStrategy":"try-catch","validationCode":"// restrict schema to estimator-supported primitives before pushdown\nfor (Types.NestedField f : schema.columns()) { /* check f.type() against supported set */ }","typeGuard":null,"tryCatchPattern":"try { scan.planFiles(); } catch (IllegalArgumentException e) { if (e.getMessage().startsWith(\"Can't handle\")) { /* fall back to non-pushdown scan or rewrite */ } throw e; }","preventionTips":["Use commonly supported primitive types in ORC tables","Upgrade Iceberg before using new types with pushdown","Disable pushdown for tables with unusual types","Test filter pushdown on new schemas"],"tags":["orc","pushdown","unsupported-type","planning"],"backgroundTag":"unsupported-operation","analyzedSha":"86d9c8fc543e7c56c9f624eb725f76c9baff9570","analyzedAt":"2026-09-12T00:46:39.097Z","contentChangedAt":"2026-09-12T00:46:39.097Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}