in measure/src/main/scala/org/apache/griffin/measure/datasource/connector/batch/FileBasedDataConnector.scala [123:138]
private def validateCSVOptions(): Unit = {
if (options.contains(Header) && config.contains(Schema)) {
griffinLogger.warn(
s"Both $Options.$Header and $Schema were provided. Defaulting to provided $Schema")
}
if (!options.contains(Header) && !config.contains(Schema)) {
throw new IllegalArgumentException(
s"Either '$Header' must be set in '$Options' or '$Schema' must be set.")
}
if (config.contains(Schema) && (schemaSeq.isEmpty || currentSchema.isEmpty)) {
throw new IllegalStateException("Unable to create schema from specification")
}
}