vedant280 opened a new pull request, #16482: URL: https://github.com/apache/pinot/pull/16482
**Description** The SparkSegmentTarPushJobRunner class has a field shadowing issue where the _spec field is declared in both the parent class (BaseSparkSegmentTarPushJobRunner) and child class, causing the child class to access an uninitialized null field instead of the properly initialised parent field. **Steps to Reproduce** 1. Instantiate SparkSegmentTarPushJobRunner with a SegmentGenerationJobSpec 2. Access the _spec field from within the child class 3. Observe that _spec is null despite being passed to the constructor **Expected Behaviour** The _spec field should be properly initialised and accessible in the child class. **Actual Behaviour** The _spec field is null in the child class due to field shadowing. **Root Cause** The issue occurs because: 1. BaseSparkSegmentTarPushJobRunner declares protected SegmentGenerationJobSpec _spec. 2. SparkSegmentTarPushJobRunner redeclares private SegmentGenerationJobSpec _spec. 3. When super(spec) is called, it initialises the parent's _spec field. 4. The child class accesses its own uninitialised _spec field instead of the parent's initialised field. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
