Re: about default value of struct of connect api

2020-01-08 Thread Lisheng Wang
update my findings, below is code of method 'defaultValue': public SchemaBuilder defaultValue(Object value) { checkCanSet(DEFAULT_FIELD, defaultValue, value); checkNotNull(TYPE_FIELD, type, DEFAULT_FIELD); try { ConnectSchema.validateValue(this, value);

Re: about default value of struct of connect api

2020-01-07 Thread Lisheng Wang
hello guys, update my question, i made a test, code as below, i want to set a default value of address to person SchemaBuilder schemaBuilder = SchemaBuilder.struct().name("address") .field("province", SchemaBuilder.STRING_SCHEMA) .field("city", SchemaBuild