@Override
    public <T> T get(int pos, Class<T> javaClass) {
        // struct can be null if wrap is not called first before the get call
        // or if a null struct is wrapped.
        if (record == null) {
            return null;
        }

        int recordPos = positionMap[pos];
        if (nestedProjections[pos] != null) {
            Record nestedStruct = record.get(recordPos, Record.class);
            if (nestedStruct == null) {
                return null;
            }

            return javaClass.cast(nestedProjections[pos].wrap(nestedStruct));
        }

        if (recordPos != -1) {
            return record.get(recordPos, javaClass);
        } else {
            return null;
        }
    }
Creates a projecting wrapper for {@link Record} rows.

<p>This projection does not work with repeated types like lists and maps.

@param dataSchema      schema of rows wrapped by this projection
@param projectedSchema result schema of the projected rows
@return a wrapper to project rows
core/src/main/java/kafka/automq/table/worker/RecordProjection.java