Class OptionSetters
java.lang.Object
io.github.flink.gcp.connector.spanner.table.OptionSetters
Applies Table API option values to DataStream builder setters, renaming a rejected value's
failure to the option key the SQL caller actually wrote (issue #1030, ADR-0133).
A builder setter's Preconditions message names the setter — the right name for a
DataStream caller, and one that appears nowhere in a WITH clause. FactoryUtil
wraps whatever a factory throws in a ValidationException whose own message says only
"Unable to create a …" line for the table, leaving the actionable sentence in the cause, so the
rename here is what makes the failure name the option. The builder's sentence stays as the
detail: the bound itself is defined and tested there, never restated here.
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T> voidApplies an already-extracted value to the setter under the given option key, for a site whose value no longer sits in aReadableConfig.static <T> voidapply(org.apache.flink.configuration.ReadableConfig config, org.apache.flink.configuration.ConfigOption<T> option, Consumer<T> setter) Applies the option's value to the setter when present; a value the setter rejects fails as aValidationExceptionnaming the option key, with the setter's own message as detail.
-
Method Details
-
apply
public static <T> void apply(org.apache.flink.configuration.ReadableConfig config, org.apache.flink.configuration.ConfigOption<T> option, Consumer<T> setter) Applies the option's value to the setter when present; a value the setter rejects fails as aValidationExceptionnaming the option key, with the setter's own message as detail. -
accept
Applies an already-extracted value to the setter under the given option key, for a site whose value no longer sits in aReadableConfig. Anullvalue applies nothing, mirroring an absent option.
-