Skip to content

chore(deps): Update jackson version to 2.18.6#27293

Open
imsayari404 wants to merge 3 commits into
prestodb:masterfrom
imsayari404:jacksoncve
Open

chore(deps): Update jackson version to 2.18.6#27293
imsayari404 wants to merge 3 commits into
prestodb:masterfrom
imsayari404:jacksoncve

Conversation

@imsayari404
Copy link
Copy Markdown
Contributor

@imsayari404 imsayari404 commented Mar 9, 2026

Description

Upgrades dep.jackson.version from 2.15.4 to 2.18.6 to remediate GHSA-72hv-8253-57qq.

Test Failures Fixed

The upgrade exposed pre-existing issues in Presto's ObjectMapper usage that 2.15.4 happened to tolerate. Each fix below is a direct response to an actual CI failure with a concrete stack trace.

Failure 1 — TestPrestoSparkStatsCalculator

com.fasterxml.jackson.databind.exc.InvalidDefinitionException:
Java 8 optional type java.util.Optional<SourceLocation>
not supported by default: add Module "jackson-datatype-jdk8"
at CachingPlanCanonicalInfoProvider.loadValue()

and

[ERROR] TestPrestoSparkStatsCalculator.testUsesHboStatsWhenMatchRuntime:123
» Presto Cannot serialize plan to JSON

failed testcase :
presto-spark-base/src/test/java/com/facebook/presto/spark/planner/TestPrestoSparkStatsCalculator.java

Root cause:
The ObjectMapper used in HistoryBasedPlanStatisticsManager (created via objectMapper.copy()) lacked Jdk8Module registration, leaving CachingPlanCanonicalInfoProvider unable to serialize Optional fields. HistoryBasedPlanStatisticsManager has a single commit since creation, meaning Jdk8Module was never explicitly registered.

Fix: .registerModule(new Jdk8Module()) after objectMapper.copy()


Failure 2 — TestDriver

java.util.NoSuchElementException: No value present
at java.util.Optional.get(Optional.java:143)
at TestDriver.<clinit>(TestDriver.java:126)

Root cause:
TestDriver passes a bare new ObjectMapper() directly to createFragmentResultCacheContext(), bypassing HistoryBasedPlanStatisticsManager entirely. Without Jdk8Module, serialization fails silently,createFragmentResultCacheContext() returns Optional.empty(), and .get()in the static initializer throws NoSuchElementException preventing the
entire test class from loading.

Fix: registerModule(new Jdk8Module()) + FAIL_ON_SELF_REFERENCES=false

  • maxNestingDepth(2000) + BlockMixIn on the bare ObjectMapper

Failure 3 — LocalQueryRunner / LocalExecutionPlanner

com.fasterxml.jackson.databind.JsonMappingException:
Infinite recursion (StackOverflowError)
at Block.getLoadedBlock()

Root cause: Block.getLoadedBlock() returns Block itself a circularreference. Confirmed in source:
presto-common/.../block/Block.java:378
default Block getLoadedBlock() ← returns this

Additionally ValueSet.getDiscreteValues() throws UnsupportedOperationException
and Range.getSingleValue() throws IllegalStateException when serialized:
presto-common/.../predicate/ValueSet.java:114
throw new UnsupportedOperationException();
and
presto-common/.../predicate/Range.java:166
throw new IllegalStateException("Range does not have just a single value");

Jackson 2.18.6's stricter error handling exposes these pre-existing issues when attempting to serialize getter methods that throw exceptions or create circular references.

Fix: FAIL_ON_SELF_REFERENCES=false + @JsonIgnore MixIns onBlock, Slice, ValueSet, SortedRangeSet, Range, Domain + maxNestingDepth(2000) for complex Presto plan structures


Failure 4 — TaskTestUtils / TestSqlTaskManager

com.fasterxml.jackson.databind.JsonMappingException:
Infinite recursion (StackOverflowError)

Root cause: Same Block.getLoadedBlock() circular reference. Both files pass bare new ObjectMapper() to SqlTaskManager.

Fix: configureObjectMapper() helper with BlockMixIn +FAIL_ON_SELF_REFERENCES=false + maxNestingDepth(2000)


Failure 5 — TestIcebergSystemTablesNessieWithBearerAuth

java.lang.NullPointerException:
Cannot invoke "NessieError.getErrorCode()" because "error" is null

Root cause: Nessie client 0.103.0 is incompatible with Jackson 2.18.6 , HTTP error responses fail to deserialize, returning null instead of a proper NessieError object.

Fix: Bump Nessie 0.103.0 → 0.105.0 which adds Jackson 2.18.6compatibility. Test updated to accept both error patterns during the transition window.


Motivation and Context

Impact

Test Plan

Contributor checklist

  • Please make sure your submission complies with our contributing guide, in particular code style and commit standards.
  • PR description addresses the issue accurately and concisely. If the change is non-trivial, a GitHub Issue is referenced.
  • Documented new properties (with its default value), SQL syntax, functions, or other functionality.
  • If release notes are required, they follow the release notes guidelines.
  • Adequate tests were added if applicable.
  • CI passed.
  • If adding new dependencies, verified they have an OpenSSF Scorecard score of 5.0 or higher (or obtained explicit TSC approval for lower scores).

Release Notes

Please follow release notes guidelines and fill in the release notes below.

== RELEASE NOTES ==
Security Changes
* Upgrade jackson dependency from 2.15.4 to version 2.18.6 to address `GHSA-72hv-8253-57qq <https://github.com/advisories/GHSA-72hv-8253-57qq>`_

Summary by Sourcery

Upgrade Jackson to 2.18.6 and adjust Presto’s JSON serialization configuration and related dependencies to remain compatible with the stricter behavior.

Bug Fixes:

  • Prevent serialization failures for Optional and complex Presto structures by configuring ObjectMapper instances with JDK8 support, relaxed self-reference handling, and MixIns to ignore problematic getters.
  • Update Nessie client usage and tests so Iceberg Nessie system table auth failures are handled correctly under the new Jackson version.

Enhancements:

  • Introduce a shared JsonObjectMapperUtils helper to centralize Jackson 2.18.6-compatible ObjectMapper configuration and reuse it across planners, query runners, and task-related tests.

Build:

  • Bump Jackson dependency to 2.18.6 and add the jackson-datatype-jdk8 module dependency.
  • Update the Nessie client dependency in the Iceberg module to a version compatible with Jackson 2.18.6.

Tests:

  • Adjust Iceberg Nessie bearer-auth test expectations to allow both legacy and new error patterns after the Jackson and Nessie upgrades and update test helpers to use the shared configured ObjectMapper.

@prestodb-ci prestodb-ci added the from:IBM PR from IBM label Mar 9, 2026
@imsayari404 imsayari404 requested a review from imjalpreet March 9, 2026 11:14
@imsayari404 imsayari404 force-pushed the jacksoncve branch 4 times, most recently from d031572 to 9dd9fac Compare March 11, 2026 06:08
@imsayari404
Copy link
Copy Markdown
Contributor Author

Regarding :

Failure 5 — TestIcebergSystemTablesNessieWithBearerAuth
java.lang.NullPointerException:
Cannot invoke "NessieError.getErrorCode()" because "error" is null
Root cause: Nessie client 0.103.0 is incompatible with Jackson 2.18.6 , HTTP error responses fail to deserialize, returning null instead of a proper NessieError object.

Fix: Bump Nessie 0.103.0 → 0.105.0 which adds Jackson 2.18.6compatibility. Test updated to accept both error patterns during the transition window.

I have reverted this fix in order to ensure testcases aren't breaking in presto-iceberg.

createConfiguredObjectMapper(),
new TaskManagerConfig().setTaskConcurrency(4));
}
private static ObjectMapper createConfiguredObjectMapper()
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing newline. The method can be a static constructor on it's own. The returned mapper a private static final

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have made the change and refactored to use the JsonObjectMapperUtils utility class.

this.standaloneSpillerFactory = requireNonNull(standaloneSpillerFactory, "standaloneSpillerFactory is null");
this.useNewNanDefinition = requireNonNull(functionsConfig, "functionsConfig is null").getUseNewNanDefinition();
}
// Configure Jackson MixIns and settings to handle serialization issues with Jackson 2.18.6
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing newline

throw new UnsupportedOperationException();
});
}
private static ObjectMapper configureObjectMapper(ObjectMapper mapper)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These two methods seems identical to the ones in LocalQueryRunner ? Can you refactor out the common components to a utility class

configureObjectMapper(new ObjectMapper()),
new SpoolingOutputBufferFactory(new FeaturesConfig()));
}
private static ObjectMapper configureObjectMapper(ObjectMapper mapper)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same comment

Comment on lines +512 to +557
private abstract static class BlockMixIn
{
@JsonIgnore
abstract Block getLoadedBlock();
}

// MixIn to ignore getOutput() method in Slice which causes circular references with BasicSliceOutput
private abstract static class SliceMixIn
{
@JsonIgnore
abstract Object getOutput();
}

// MixIn to ignore getDiscreteValues() method in ValueSet which throws UnsupportedOperationException
private abstract static class ValueSetMixIn
{
@JsonIgnore
abstract Object getDiscreteValues();
}

// MixIn to ignore getSingleValue() method and valuesProcessor field in SortedRangeSet
private abstract static class SortedRangeSetMixIn
{
@JsonIgnore
abstract Object getSingleValue();

@JsonIgnore
abstract Object getValuesProcessor();
}

// MixIn to ignore getSingleValue() method in Range which throws IllegalStateException
private abstract static class RangeMixIn
{
@JsonIgnore
abstract Object getSingleValue();
}

// MixIn to ignore getSingleValue() and getNullableSingleValue() methods in Domain which throw IllegalStateException
private abstract static class DomainMixIn
{
@JsonIgnore
abstract Object getSingleValue();

@JsonIgnore
abstract Object getNullableSingleValue();
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need to create individual classes here ? Could we instead create a single IgnoreFieldsMixIn and define the virtual methods with @JsonIgnore on them ?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consolidated into a single IgnoreProblematicMethodsMixIn class 👍🏻

@imsayari404 imsayari404 marked this pull request as ready for review March 13, 2026 13:55
@prestodb-ci prestodb-ci requested review from a team and Mariamalmesfer and removed request for a team March 13, 2026 13:55
@sourcery-ai
Copy link
Copy Markdown
Contributor

sourcery-ai Bot commented Mar 13, 2026

Reviewer's Guide

Updates the global Jackson dependency to 2.18.6 and introduces a centralized ObjectMapper configuration utility to handle Optional support, self-reference and deep nesting issues, wiring it into key planner/execution/testing code paths and updating Nessie to a compatible version.

Sequence diagram for configuring ObjectMapper in HistoryBasedPlanStatisticsManager

sequenceDiagram
participant HistoryBasedPlanStatisticsManager
participant ObjectMapper_original
participant ObjectMapper_copy
participant JsonObjectMapperUtils
participant CachingPlanCanonicalInfoProvider

HistoryBasedPlanStatisticsManager->>ObjectMapper_original: copy()
ObjectMapper_original-->>HistoryBasedPlanStatisticsManager: ObjectMapper_copy

HistoryBasedPlanStatisticsManager->>ObjectMapper_copy: configure(ORDER_MAP_ENTRIES_BY_KEYS, true)
HistoryBasedPlanStatisticsManager->>ObjectMapper_copy: configure(SORT_PROPERTIES_ALPHABETICALLY, true)

HistoryBasedPlanStatisticsManager->>JsonObjectMapperUtils: configureObjectMapperForJackson2186(ObjectMapper_copy)
JsonObjectMapperUtils-->>HistoryBasedPlanStatisticsManager: configured ObjectMapper_copy

HistoryBasedPlanStatisticsManager->>CachingPlanCanonicalInfoProvider: new(historyBasedStatisticsCacheManager, ObjectMapper_copy, metadata)
CachingPlanCanonicalInfoProvider-->>HistoryBasedPlanStatisticsManager: instance ready
Loading

Class diagram for centralized Jackson 2_18_6 ObjectMapper configuration

classDiagram
class JsonObjectMapperUtils {
  <<final>>
  +static ObjectMapper configureObjectMapperForJackson2186(ObjectMapper objectMapper)
  +static ObjectMapper createConfiguredObjectMapper()
}

class IgnoreProblematicMethodsMixIn {
  <<abstract>>
  +Object getLoadedBlock()
  +Object getOutput()
  +Object getDiscreteValues()
  +Object getSingleValue()
  +Object getValuesProcessor()
  +Object getNullableSingleValue()
}

class LocalExecutionPlanner {
  -ObjectMapper sortedMapObjectMapper
}

class HistoryBasedPlanStatisticsManager {
  -ObjectMapper newObjectMapper
}

class LocalQueryRunner {
  -ObjectMapper objectMapper
}

class ObjectMapper
class Block
class Slice
class ValueSet
class SortedRangeSet
class Range
class Domain

JsonObjectMapperUtils ..> ObjectMapper : configures
JsonObjectMapperUtils ..> Block : addsMixIn
JsonObjectMapperUtils ..> Slice : addsMixIn
JsonObjectMapperUtils ..> ValueSet : addsMixIn
JsonObjectMapperUtils ..> SortedRangeSet : addsMixIn
JsonObjectMapperUtils ..> Range : addsMixIn
JsonObjectMapperUtils ..> Domain : addsMixIn

JsonObjectMapperUtils *-- IgnoreProblematicMethodsMixIn : innerMixIn
IgnoreProblematicMethodsMixIn <|.. Block : appliedAsMixIn
IgnoreProblematicMethodsMixIn <|.. Slice : appliedAsMixIn
IgnoreProblematicMethodsMixIn <|.. ValueSet : appliedAsMixIn
IgnoreProblematicMethodsMixIn <|.. SortedRangeSet : appliedAsMixIn
IgnoreProblematicMethodsMixIn <|.. Range : appliedAsMixIn
IgnoreProblematicMethodsMixIn <|.. Domain : appliedAsMixIn

LocalExecutionPlanner ..> JsonObjectMapperUtils : configureObjectMapperForJackson2186
HistoryBasedPlanStatisticsManager ..> JsonObjectMapperUtils : configureObjectMapperForJackson2186
LocalQueryRunner ..> JsonObjectMapperUtils : createConfiguredObjectMapper
Loading

File-Level Changes

Change Details Files
Upgrade Jackson and add jdk8 datatype module to support Optional and stricter serialization behavior.
  • Bump dep.jackson.version from 2.15.4 to 2.18.6 in the root pom.
  • Add jackson-datatype-jdk8 dependency to the main module pom.
  • Configure ObjectMapper instances to register Jdk8Module for Java 8 Optional support.
pom.xml
presto-main-base/pom.xml
presto-main-base/src/main/java/com/facebook/presto/cost/HistoryBasedPlanStatisticsManager.java
presto-main-base/src/main/java/com/facebook/presto/util/JsonObjectMapperUtils.java
Introduce a shared ObjectMapper configuration helper and apply it to planner, runner, and test utilities to avoid recursion, empty bean, Optional, and nesting issues under Jackson 2.18.6.
  • Create JsonObjectMapperUtils with configureObjectMapperForJackson2186 and createConfiguredObjectMapper helpers that set FAIL_ON_SELF_REFERENCES and FAIL_ON_EMPTY_BEANS to false, register Jdk8Module, increase StreamWriteConstraints max nesting depth, and apply MixIns to problematic types.
  • Wire JsonObjectMapperUtils.configureObjectMapperForJackson2186 into LocalExecutionPlanner sortedMapObjectMapper construction to ensure consistent configuration on copied mappers.
  • Replace direct new ObjectMapper() usages in LocalQueryRunner, TaskTestUtils, TestSqlTaskManager, and TestDriver with JsonObjectMapperUtils.createConfiguredObjectMapper() so tests use the same safe configuration.
  • Ensure HistoryBasedPlanStatisticsManager’s copied mapper is passed through JsonObjectMapperUtils.configureObjectMapperForJackson2186 after existing ordering-related settings are applied.
presto-main-base/src/main/java/com/facebook/presto/util/JsonObjectMapperUtils.java
presto-main-base/src/main/java/com/facebook/presto/sql/planner/LocalExecutionPlanner.java
presto-main-base/src/main/java/com/facebook/presto/cost/HistoryBasedPlanStatisticsManager.java
presto-main-base/src/main/java/com/facebook/presto/testing/LocalQueryRunner.java
presto-main-base/src/test/java/com/facebook/presto/execution/TaskTestUtils.java
presto-main-base/src/test/java/com/facebook/presto/execution/TestSqlTaskManager.java
presto-main-base/src/test/java/com/facebook/presto/operator/TestDriver.java
Apply Jackson MixIns to ignore problematic methods on core data structures that cause recursion or runtime exceptions when serialized.
  • Define IgnoreProblematicMethodsMixIn inside JsonObjectMapperUtils that marks methods such as getLoadedBlock, getOutput, getDiscreteValues, getSingleValue, getValuesProcessor, and getNullableSingleValue with @JsonIgnore.
  • Register this MixIn for Block, Slice, ValueSet, SortedRangeSet, Range, and Domain within JsonObjectMapperUtils to prevent infinite recursion and exception-throwing getters from participating in serialization.
presto-main-base/src/main/java/com/facebook/presto/util/JsonObjectMapperUtils.java
presto-common/src/main/java/com/facebook/presto/common/block/Block.java
presto-common/src/main/java/com/facebook/presto/common/predicate/ValueSet.java
presto-common/src/main/java/com/facebook/presto/common/predicate/SortedRangeSet.java
presto-common/src/main/java/com/facebook/presto/common/predicate/Range.java
presto-common/src/main/java/com/facebook/presto/common/predicate/Domain.java
presto-main-base/src/main/java/io/airlift/slice/Slice.java
Update Nessie dependency and relax an Iceberg test assertion to account for changed error behavior under Jackson 2.18.6.
  • Bump Nessie client version property from 0.103.0 to 0.105.0 in presto-iceberg pom.
  • Modify TestIcebergSystemTablesNessieWithBearerAuth.testInvalidBearerToken to accept either the standard Unauthorized (HTTP/401) message or the NullPointerException path caused by failed NessieError deserialization.
presto-iceberg/pom.xml
presto-iceberg/src/test/java/com/facebook/presto/iceberg/nessie/TestIcebergSystemTablesNessieWithBearerAuth.java

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Copy link
Copy Markdown
Contributor

@sourcery-ai sourcery-ai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've left some high level feedback:

  • The JsonObjectMapperUtils.configureObjectMapperForJackson2186 name bakes in a specific Jackson version and will age poorly; consider a version-agnostic name (e.g., configurePlanObjectMapper or similar) so future upgrades don't require a rename or misleading method name.
  • configureObjectMapperForJackson2186 both mutates the passed ObjectMapper and returns it, but callers sometimes ignore the return value; it would be clearer to either make this method purely functional (return a new mapper) or clearly side-effecting (void, with all callers using the same pattern).
  • In TestIcebergSystemTablesNessieWithBearerAuth, the relaxed regex that also accepts the NessieError NPE will mask regressions now that Nessie is bumped to 0.105.0; consider keeping a stricter assertion and, if needed, gating transitional behavior on the dependency version instead of permanently broadening the expected failure.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- The `JsonObjectMapperUtils.configureObjectMapperForJackson2186` name bakes in a specific Jackson version and will age poorly; consider a version-agnostic name (e.g., `configurePlanObjectMapper` or similar) so future upgrades don't require a rename or misleading method name.
- `configureObjectMapperForJackson2186` both mutates the passed `ObjectMapper` and returns it, but callers sometimes ignore the return value; it would be clearer to either make this method purely functional (return a new mapper) or clearly side-effecting (void, with all callers using the same pattern).
- In `TestIcebergSystemTablesNessieWithBearerAuth`, the relaxed regex that also accepts the `NessieError` NPE will mask regressions now that Nessie is bumped to 0.105.0; consider keeping a stricter assertion and, if needed, gating transitional behavior on the dependency version instead of permanently broadening the expected failure.

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@imsayari404 imsayari404 force-pushed the jacksoncve branch 2 times, most recently from a55efa9 to d5c94f8 Compare March 13, 2026 14:03
@imsayari404 imsayari404 requested a review from aaneja March 13, 2026 14:16
aaneja
aaneja previously approved these changes Mar 18, 2026
Copy link
Copy Markdown
Contributor

@aaneja aaneja left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to fix the underlying via jackson annotations or create use-case based Json serde classes. Let's create TODOs for these and follow up.
Approving since tests are passing with the current Ignore mix-ins

private abstract static class IgnoreProblematicMethodsMixIn
{
// Ignore Block.getLoadedBlock() - causes circular reference
@JsonIgnore
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For this circular reference why not add the @JsonIgnore to the Block interface directly ?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See also - BlockJsonSerde class

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree that adding @JsonIgnore directly to the Block interface would be cleaner. I used the MixIn approach to fix the Jackson 2.18.6 compatibility issue without modifying multiple interface files.

We need to fix the underlying via jackson annotations or create use-case based Json serde classes. Let's >create TODOs for these and follow up.

sure, will do that

// Ignore Range.getSingleValue() - throws IllegalStateException
// Ignore Domain.getSingleValue() - throws IllegalStateException
@JsonIgnore
abstract Object getSingleValue();
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For these - can you reply with the actual IllegalStateException text ?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Domain.getSingleValue() (Domain.java):

throw new IllegalStateException("Domain is not a single value");

Range.getSingleValue() (Range.java):

throw new IllegalStateException("Range does not have just a single value");

SortedRangeSet.getSingleValue() (SortedRangeSet.java):

throw new IllegalStateException("SortedRangeSet does not have just a single value");

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are just the default method implementations that Jackson is now calling. Makes sense to JsonIgnore them 👍

@prestodb-ci
Copy link
Copy Markdown
Contributor

@imsayari404 imported this issue as lakehouse/presto #27293

@prestodb-ci prestodb-ci added follow-up-1 1st time follow-up (alchemy generated) need-follow-up Need any type of follow-up (alchemy generated) labels Apr 2, 2026
@prestodb-ci
Copy link
Copy Markdown
Contributor

Assigning this issue to @faizdani because you are the default assignee for issue follow-up scheme ForwardFit. Feel free to re-route accordingly.

@prestodb-ci
Copy link
Copy Markdown
Contributor

@faizdani
Can you please provide an update on this issue? Thank you!

@prestodb-ci prestodb-ci added follow-up-2 2nd time follow-up (alchemy generated) and removed follow-up-1 1st time follow-up (alchemy generated) labels Apr 9, 2026
@imsayari404
Copy link
Copy Markdown
Contributor Author

imsayari404 commented Apr 13, 2026

Update: Airbase Jackson Upgrade

I created an airbase PR to upgrade Jackson there: prestodb/airbase#43

Key findings:

Airbase manages Jackson version (currently 2.10.0):

https://github.com/prestodb/airbase/blob/master/airbase/pom.xml#L147

Airlift already supports Jackson 2.18.6 where ObjectMapperProvider registers Jdk8Module():

https://github.com/prestodb/airlift/blob/master/json/src/main/java/com/facebook/airlift/json/ObjectMapperProvider.java#L63

This Presto PR adds Presto-specific ObjectMapper configurations for Block, Domain, Range classes that don't exist in airbase/airlift.

Both PRs are independent and can proceed in parallel.

Hi @tdcmeehan , Could you please review when you get a chance?

@prestodb-ci
Copy link
Copy Markdown
Contributor

Assigning this issue to @faizdani because you are the default assignee for issue follow-up scheme ForwardFit. Feel free to re-route accordingly.

@prestodb-ci
Copy link
Copy Markdown
Contributor

@faizdani
Can you please provide an update on this issue? Thank you!

@prestodb-ci prestodb-ci added follow-up-3 3rd time follow-up (alchemy generated) and removed follow-up-2 2nd time follow-up (alchemy generated) labels Apr 16, 2026
@imsayari404
Copy link
Copy Markdown
Contributor Author

Update: Following to fix root causes with @JsonIgnore annotations, I've added @JsonIgnore directly to all Presto-owned classes (Block, Domain, Range, ValueSet, SortedRangeSet). For the external Slice library circular reference issue (Slice.getOutput() → BasicSliceOutput → infinite loop), I've added a temporary MixIn in HistoryBasedPlanStatisticsManager.java and LocalExecutionPlanner.java while the permanent fix is in progress via upstream PR: prestodb/slice#4. Once the Slice PR is approved, I'll update the Slice dependency version in this pr and remove the temporary MixIns.

@prestodb-ci
Copy link
Copy Markdown
Contributor

Assigning this issue to @faizdani because you are the default assignee for issue follow-up scheme ForwardFit. Feel free to re-route accordingly.

@prestodb-ci
Copy link
Copy Markdown
Contributor

@faizdani
Can you please provide an update on this issue? Thank you!

@prestodb-ci prestodb-ci added follow-up-4 4th time follow-up (alchemy generated) and removed follow-up-3 3rd time follow-up (alchemy generated) labels Apr 23, 2026
@prestodb-ci
Copy link
Copy Markdown
Contributor

Assigning this issue to @faizdani because you are the default assignee for issue follow-up scheme ForwardFit. Feel free to re-route accordingly.

@prestodb-ci
Copy link
Copy Markdown
Contributor

@faizdani
Can you please provide an update on this issue? Thank you!

@imsayari404
Copy link
Copy Markdown
Contributor Author

imsayari404 commented May 6, 2026

@imjalpreet / @aaneja / @nishithakbhaskaran, could you please review when you get a chance?

@prestodb-ci
Copy link
Copy Markdown
Contributor

Assigning this issue to @faizdani because you are the default assignee for issue follow-up scheme ForwardFit. Feel free to re-route accordingly.

@prestodb-ci
Copy link
Copy Markdown
Contributor

@faizdani
Can you please provide an update on this issue? Thank you!

.maxNestingDepth(2000)
.build());

// Added MixIn for Slice circular reference, it's an external library
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With prestodb/slice#4 this become redundant right ?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, exactly once prestodb/slice#4 is merged and released, this MixIn becomes redundant

Copy link
Copy Markdown
Contributor

@nishithakbhaskaran nishithakbhaskaran left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Appreciate the effort @imsayari404 !!
Thanks for the upgrade

@prestodb-ci
Copy link
Copy Markdown
Contributor

Assigning this issue to @faizdani because you are the default assignee for issue follow-up scheme ForwardFit. Feel free to re-route accordingly.

@prestodb-ci
Copy link
Copy Markdown
Contributor

@faizdani
Can you please provide an update on this issue? Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

follow-up-4 4th time follow-up (alchemy generated) ForwardFit Items from IBM Forward Fit from:IBM PR from IBM need-follow-up Need any type of follow-up (alchemy generated)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants