/** * attempts to validate and construct a {@link MessageType} from a read projection schema * * @param fileMessageType the typed schema of the source * @param partialReadSchemaString the requested projection schema * @return the typed schema that should be used to read */ public static MessageType getSchemaForRead(MessageType fileMessageType, String partialReadSchemaString) { if (partialReadSchemaString == null) return fileMessageType; MessageType requestedMessageType = MessageTypeParser.parseMessageType(partialReadSchemaString); return getSchemaForRead(fileMessageType, requestedMessageType); }
/** * attempts to validate and construct a {@link MessageType} from a read projection schema * * @param fileMessageType the typed schema of the source * @param partialReadSchemaString the requested projection schema * @return the typed schema that should be used to read */ public static MessageType getSchemaForRead(MessageType fileMessageType, String partialReadSchemaString) { if (partialReadSchemaString == null) return fileMessageType; MessageType requestedMessageType = MessageTypeParser.parseMessageType(partialReadSchemaString); return getSchemaForRead(fileMessageType, requestedMessageType); }