{"record":{"id":"3f5854e8dd032104","repo":"prestodb/presto","slug":"not-supported-3f5854","errorCode":"NOT_SUPPORTED","errorMessage":"Bucketed table in SymlinkTextInputFormat is not yet supported","messagePattern":"Bucketed table in SymlinkTextInputFormat is not yet supported","errorType":"error_code","errorClass":"PrestoException","httpStatus":null,"severity":"error","filePath":"presto-hive/src/main/java/com/facebook/presto/hive/StoragePartitionLoader.java","lineNumber":184,"sourceCode":"\n    private ListenableFuture<?> handleSymlinkTextInputFormat(\n            ExtendedFileSystem fs,\n            Path path,\n            InputFormat<?, ?> inputFormat,\n            boolean s3SelectPushdownEnabled,\n            Storage storage,\n            List<HivePartitionKey> partitionKeys,\n            String partitionName,\n            int partitionDataColumnCount,\n            boolean stopped,\n            HivePartitionMetadata partition,\n            HiveSplitSource hiveSplitSource,\n            Configuration configuration,\n            boolean splittable)\n            throws IOException\n    {\n        if (tableBucketInfo.isPresent()) {\n            throw new PrestoException(NOT_SUPPORTED, \"Bucketed table in SymlinkTextInputFormat is not yet supported\");\n        }\n\n        List<Path> targetPaths = getTargetPathsFromSymlink(fs, path, partition.getPartition());\n\n        if (isSymlinkOptimizedReaderEnabled(session)) {\n            Map<Path, List<Path>> parentToTargets = targetPaths.stream().collect(Collectors.groupingBy(Path::getParent));\n\n            InputFormat<?, ?> targetInputFormat = getInputFormat(\n                    configuration,\n                    storage.getStorageFormat().getInputFormat(),\n                    storage.getStorageFormat().getSerDe(),\n                    true);\n\n            HiveDirectoryContext hiveDirectoryContext = new HiveDirectoryContext(\n                    IGNORED,\n                    isUseListDirectoryCache(session),\n                    isSkipEmptyFilesEnabled(session),\n                    hdfsContext.getIdentity(),","sourceCodeStart":166,"sourceCodeEnd":202,"githubUrl":"https://github.com/prestodb/presto/blob/55bb57d202de3b926896fa966c2c4a44c779634e/presto-hive/src/main/java/com/facebook/presto/hive/StoragePartitionLoader.java#L166-L202","documentation":"SymlinkTextInputFormat stores a symlink file listing target data files instead of a plain directory layout. Presto's symlink handling path cannot distribute rows into buckets, so when a bucketed table uses this input format it refuses up front with NOT_SUPPORTED. This is a deliberate capability guard, not a data corruption condition.","triggerScenarios":"loadPartition() dispatches to handleSymlinkTextInputFormat() and the resolved tableBucketInfo is present — i.e. a Hive table declared with CLUSTERED BY ... INTO n BUCKETS whose partition uses SymlinkTextInputFormat.","commonSituations":"Tables created by engines (e.g. older Hive or Spark setups) that emit symlink manifest files for bucketed partitions; copying a bucketed table's metadata into a symlink-based layout; storage format set to SymlinkTextInputFormat on a bucketed table.","solutions":["Rewrite the table/partitions to a regular input format (e.g. skip SymlinkTextInputFormat and store data files directly in the partition directory)","Remove the CLUSTERED BY/BUCKETS declaration (ALTER TABLE ... UNBUCKET or recreate the table unbucketed) if bucketing is not required","Write the data without bucketing using an engine that supports it, then query unbucketed","Split the dataset: keep bucketed partitions in a normal input-format table and symlink layouts in an unbucketed one"],"exampleFix":"-- before\nCREATE TABLE t (...) CLUSTERED BY (k) INTO 32 BUCKETS STORED AS INPUTFORMAT 'org.apache.hadoop.hive.ql.io.SymlinkTextInputFormat';\n-- after\nCREATE TABLE t (...) STORED AS INPUTFORMAT 'org.apache.hadoop.hive.ql.io.SymlinkTextInputFormat'; -- drop bucketing, or use a normal input format with buckets","handlingStrategy":"validation","validationCode":"-- detect the condition before querying\nSHOW CREATE TABLE my_table; -- look for CLUSTERED BY ... BUCKETS plus SymlinkTextInputFormat\n-- or in code:\nboolean unsupported = table.getStorage().getStorageFormat().getInputFormat().contains(\"SymlinkTextInputFormat\")\n    && table.getBucketProperty().isPresent();","typeGuard":null,"tryCatchPattern":"try {\n    connector.splitManager().getSplits(...);\n} catch (PrestoException e) {\n    if (NOT_SUPPORTED.equals(e.getErrorCode().getName())) {\n        // fall back to an unbucketed copy of the table\n        return queryUnbucketedCopy();\n    }\n    throw e;\n}","preventionTips":["Never combine BUCKETS with SymlinkTextInputFormat when creating tables","Validate table DDL after migrations between engines (Hive/Spark symlink layouts)","Keep bucketed data in flat directories with a standard input format","Document bucketing constraints for teams copying table metadata"],"tags":["hive","bucketing","symlink","not-supported"],"backgroundTag":"bucketed-table-unsupported","analyzedSha":"55bb57d202de3b926896fa966c2c4a44c779634e","analyzedAt":"2026-09-04T12:50:26.162Z","contentChangedAt":"2026-09-04T12:50:26.162Z","schemaVersion":2},"datasetVersion":"2026-09-11T21:17:09.523Z"}