@Nullable
  public Object getValue(String fieldName) {

    // if field's value was previously read as null, return null
    if (_nullValueFields.contains(fieldName)) {
      return null;
    }
    if (_segment == null) {
      throw new IllegalStateException("Index segment for Lazy row is uninitialized.");
    }

    // compute the _fieldToValueMap or _nullValueFields based on the indexed value
    return _fieldToValueMap.computeIfAbsent(fieldName, col -> {
      Object value = null;
      try (PinotSegmentColumnReader columnReader = new PinotSegmentColumnReader(_segment, col)) {
        if (!columnReader.isNull(_docId)) {
          value = columnReader.getValue(_docId);
        } else {
          _nullValueFields.add(fieldName);
        }
      } catch (IOException e) {
        throw new RuntimeException(
            String.format("Caught exception while closing pinotSegmentColumnReader for fieldName: %s", fieldName), e);
      }
      return value;
    });
  }
@Test
  public void testGetValue() {
    IndexSegment segment = getMockSegment();
    LazyRow lazyRow = spy(new LazyRow());
    lazyRow.init(segment, 1);

    // should return persisted value
    assertEquals(lazyRow.getValue("col2"), "val2");

    // second invocation should read from LazyRow._nullValueFields
    assertEquals(lazyRow.getValue("col2"), "val2");
    // only one disk read
    verify(_col2Dictionary, times(1)).get(1);

    assertNull(lazyRow.getValue("col1"));
  }