apache / apache/pinot

Add variant for jsonPathString(Object object, String jsonPath, String defaultValue)

Open
#7,440 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
6.1k
Forks
1.5k
Avg merge
1d 21h
Merged PRs (30d)
189

Description

Currently if we are not able to find a value at the given jsonPath, we just return defaultValue. This implies that Null value support functionality can't be used by the customer: https://docs.pinot.apache.org/developers/advanced/null-value-support

Can we add another variant where we return "null" in such scenarios ?

cc @npawar

Contributor guide

Open the contributing guide

Research direction

Start by locating the jsonPathString(Object object, String jsonPath, String defaultValue) implementation and any related tests in Apache Pinot. Add the requested variant for missing paths while preserving the existing default-value behavior. Done means both variants have tests covering a found value and an absent JSON path.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
databases
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.