{"record":{"id":"0b9611801f35d549","repo":"apache/iceberg","slug":"hilbert-rewrite-strategy-not-implemented-for-this","errorCode":null,"errorMessage":"HILBERT Rewrite Strategy not implemented for this framework","messagePattern":"HILBERT Rewrite Strategy not implemented for this framework","errorType":"exception","errorClass":"UnsupportedOperationException","httpStatus":null,"severity":"error","filePath":"api/src/main/java/org/apache/iceberg/actions/RewriteDataFiles.java","lineNumber":198,"sourceCode":"  /**\n   * Choose Z-ORDER as a strategy for this rewrite operation with a specified list of columns to use\n   *\n   * @param columns Columns to be used to generate Z-Values\n   * @return this for method chaining\n   */\n  default RewriteDataFiles zOrder(String... columns) {\n    throw new UnsupportedOperationException(\n        \"Z-ORDER Rewrite Strategy not implemented for this framework\");\n  }\n\n  /**\n   * Choose HILBERT as a strategy for this rewrite operation with a specified list of columns to use\n   *\n   * @param columns Columns to be used to generate Hilbert values\n   * @return this for method chaining\n   */\n  default RewriteDataFiles hilbert(String... columns) {\n    throw new UnsupportedOperationException(\n        \"HILBERT Rewrite Strategy not implemented for this framework\");\n  }\n\n  /**\n   * A user provided filter for determining which files will be considered by the rewrite strategy.\n   * This will be used in addition to whatever rules the rewrite strategy generates. For example\n   * this would be used for providing a restriction to only run rewrite on a specific partition.\n   *\n   * @param expression An iceberg expression used to determine which files will be considered for\n   *     rewriting\n   * @return this for chaining\n   */\n  RewriteDataFiles filter(Expression expression);\n\n  /**\n   * A map of file group information to the results of rewriting that file group. If the results are\n   * null then that particular file group failed. We should only have failed groups if partial\n   * progress is enabled otherwise we will report a total failure for the job.","sourceCodeStart":180,"sourceCodeEnd":216,"githubUrl":"https://github.com/apache/iceberg/blob/86d9c8fc543e7c56c9f624eb725f76c9baff9570/api/src/main/java/org/apache/iceberg/actions/RewriteDataFiles.java#L180-L216","documentation":"RewriteDataFiles.hilbert(String...) selects the HILBERT curve rewrite strategy over the given columns. The interface default throws UnsupportedOperationException; invoking the stub means the current framework binding has not implemented the HILBERT strategy.","triggerScenarios":"Calling rewriteDataFiles().hilbert(\"colA\", \"colB\") on an implementation that has not overridden the default hilbert method.","commonSituations":"Users choosing HILBERT over Z-ORDER for better locality on multi-dimensional data, but running against an engine binding (or older version) lacking the override; the failure happens when building the action.","solutions":["Use an implementation that supports HILBERT (e.g. SparkActions' RewriteDataFiles)","Use zOrder(...) instead if the implementation supports it","Fall back to sort() or binpack() strategies available in the current implementation","Upgrade the integration module to a version implementing HILBERT"],"exampleFix":"// before\nRewriteDataFiles.Result r = actions.rewriteDataFiles(table)\n    .hilbert(\"x\", \"y\")\n    .execute();\n// after\nRewriteDataFiles.Result r = actions.rewriteDataFiles(table)\n    .zOrder(\"x\", \"y\") // if supported, or binpack()\n    .execute();","handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":"try {\n  rewrite.hilbert(columns);\n} catch (UnsupportedOperationException e) {\n  rewrite.zOrder(columns); // or binpack()\n}","preventionTips":["Verify HILBERT support before choosing it over Z-ORDER","Keep a strategy priority chain (hilbert -> zOrder -> sort -> binpack)","Use SparkActions for space-filling-curve strategies","Test compaction configuration on the actual engine version in use"],"tags":["unsupported-operation","java","compaction","hilbert-curve"],"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"}