dominikriemer commented on code in PR #104:
URL:
https://github.com/apache/incubator-streampipes/pull/104#discussion_r948352841
##########
streampipes-extensions/streampipes-connect-adapters-iiot/src/main/java/org/apache/streampipes/connect/iiot/protocol/stream/FileStreamProtocol.java:
##########
@@ -211,11 +211,12 @@ public GuessSchema getGuessSchema() throws ParseException
{
List<byte[]> dataByte = parser.parseNEvents(dataInputStream, 2);
- EventSchema eventSchema = parser.getEventSchema(dataByte);
-
- GuessSchema result = SchemaGuesser.guessSchma(eventSchema);
-
- return result;
+ if (parser.supportsPreview()) {
Review Comment:
Yes, needed to distinguish between formats that support previews and those
which do not. The interface has a default implementation pointing to false, so
that no changes are required to existing formats. We can deprecate the method
once all formats support the preview feature.
--
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]