@Test public void testFromConnectSchemaless() { Object nullConverted = avroData.fromConnectData(null, null); assertNull(nullConverted); checkNonRecordConversionNull(null); GenericRecord avroIntRecord = new GenericRecordBuilder(AvroData.ANYTHING_SCHEMA) .set("int", 12) .build(); checkNonRecordConversion(AvroData.ANYTHING_SCHEMA, avroIntRecord, null, (byte) 12, avroData); checkNonRecordConversion(AvroData.ANYTHING_SCHEMA, avroIntRecord, null, (short) 12, avroData); checkNonRecordConversion(AvroData.ANYTHING_SCHEMA, avroIntRecord, null, 12, avroData); GenericRecord avroLongRecord = new GenericRecordBuilder(AvroData.ANYTHING_SCHEMA) .set("long", 12L) .build(); checkNonRecordConversion(AvroData.ANYTHING_SCHEMA, avroLongRecord, null, 12L, avroData); GenericRecord avroFloatRecord = new GenericRecordBuilder(AvroData.ANYTHING_SCHEMA) .set("float", 12.2f) .build(); checkNonRecordConversion(AvroData.ANYTHING_SCHEMA, avroFloatRecord, null, 12.2f, avroData); GenericRecord avroDoubleRecord = new GenericRecordBuilder(AvroData.ANYTHING_SCHEMA) .set("double", 12.2) .build(); checkNonRecordConversion(AvroData.ANYTHING_SCHEMA, avroDoubleRecord, null, 12.2, avroData); GenericRecord avroBooleanRecord = new GenericRecordBuilder(AvroData.ANYTHING_SCHEMA) .set("boolean", true) .build(); checkNonRecordConversion(AvroData.ANYTHING_SCHEMA, avroBooleanRecord, null, true, avroData); GenericRecord avroStringRecord = new GenericRecordBuilder(AvroData.ANYTHING_SCHEMA) .set("string", "teststring") .build(); checkNonRecordConversion(AvroData.ANYTHING_SCHEMA, avroStringRecord, null, "teststring", avroData); GenericRecord avroNullRecord = new GenericRecordBuilder(AvroData.ANYTHING_SCHEMA).build(); GenericRecord avroArrayRecord = new GenericRecordBuilder(AvroData.ANYTHING_SCHEMA) .set("array", Arrays.asList(avroIntRecord, avroStringRecord, avroNullRecord)) .build(); checkNonRecordConversion(AvroData.ANYTHING_SCHEMA, avroArrayRecord, null, Arrays.asList(12, "teststring", null), avroData); GenericRecord avroMapEntry = new GenericRecordBuilder(AvroData.ANYTHING_SCHEMA_MAP_ELEMENT) .set("key", avroIntRecord) .set("value", avroStringRecord) .build(); GenericRecord avroMapEntryNull = new GenericRecordBuilder(AvroData.ANYTHING_SCHEMA_MAP_ELEMENT) .set("key", new GenericRecordBuilder(AvroData.ANYTHING_SCHEMA).set("int", 13).build()) .set("value", avroNullRecord) .build(); GenericRecord avroMapRecord = new GenericRecordBuilder(AvroData.ANYTHING_SCHEMA) .set("map", Arrays.asList(avroMapEntry, avroMapEntryNull)) .build(); HashMap<Object, Object> convertedMap = new HashMap<>(); convertedMap.put(12, "teststring"); convertedMap.put(13, null); checkNonRecordConversion(AvroData.ANYTHING_SCHEMA, avroMapRecord, null, convertedMap, avroData); }
public Object fromConnectData(Schema schema, Object value) { org.apache.avro.Schema avroSchema = fromConnectSchema(schema); return fromConnectData(schema, avroSchema, value); }
AvroData { public Object fromConnectData(Schema schema, Object value) { org.apache.avro.Schema avroSchema = fromConnectSchema(schema); return fromConnectData(schema, avroSchema, value); } }
AvroData { public Object fromConnectData(Schema schema, Object value) { org.apache.avro.Schema avroSchema = fromConnectSchema(schema); return fromConnectData(schema, avroSchema, value); } AvroData(int cacheSize);  AvroData(AvroDataConfig avroDataConfig); }
AvroData { public Object fromConnectData(Schema schema, Object value) { org.apache.avro.Schema avroSchema = fromConnectSchema(schema); return fromConnectData(schema, avroSchema, value); } AvroData(int cacheSize);  AvroData(AvroDataConfig avroDataConfig); Object fromConnectData(Schema schema, Object value); org.apache.avro.Schema fromConnectSchema(Schema schema); org.apache.avro.Schema fromConnectSchema(Schema schema,
                                                  Map<Schema, org.apache.avro.Schema> schemaMap); org.apache.avro.Schema fromConnectSchema(Schema schema,
                                                  FromConnectContext fromConnectContext,
                                                  boolean ignoreOptional); org.apache.avro.Schema fromConnectSchemaWithCycle(
      Schema schema,
      FromConnectContext fromConnectContext, boolean ignoreOptional); SchemaAndValue toConnectData(org.apache.avro.Schema avroSchema, Object value); SchemaAndValue toConnectData(org.apache.avro.Schema avroSchema, Object value,
                                      Integer version); Schema toConnectSchema(org.apache.avro.Schema schema); static Schema nonOptional(Schema schema); static List<Field> fields(Schema schema); static Schema keySchema(Schema schema); static Schema valueSchema(Schema schema); }
AvroData { public Object fromConnectData(Schema schema, Object value) { org.apache.avro.Schema avroSchema = fromConnectSchema(schema); return fromConnectData(schema, avroSchema, value); } AvroData(int cacheSize);  AvroData(AvroDataConfig avroDataConfig); Object fromConnectData(Schema schema, Object value); org.apache.avro.Schema fromConnectSchema(Schema schema); org.apache.avro.Schema fromConnectSchema(Schema schema,
                                                  Map<Schema, org.apache.avro.Schema> schemaMap); org.apache.avro.Schema fromConnectSchema(Schema schema,
                                                  FromConnectContext fromConnectContext,
                                                  boolean ignoreOptional); org.apache.avro.Schema fromConnectSchemaWithCycle(
      Schema schema,
      FromConnectContext fromConnectContext, boolean ignoreOptional); SchemaAndValue toConnectData(org.apache.avro.Schema avroSchema, Object value); SchemaAndValue toConnectData(org.apache.avro.Schema avroSchema, Object value,
                                      Integer version); Schema toConnectSchema(org.apache.avro.Schema schema); static Schema nonOptional(Schema schema); static List<Field> fields(Schema schema); static Schema keySchema(Schema schema); static Schema valueSchema(Schema schema); static final String NAMESPACE; static final String DEFAULT_SCHEMA_NAME; static final String DEFAULT_SCHEMA_FULL_NAME; static final String MAP_ENTRY_TYPE_NAME; static final String KEY_FIELD; static final String VALUE_FIELD; static final String CONNECT_NAME_PROP; static final String CONNECT_DOC_PROP; static final String CONNECT_VERSION_PROP; static final String CONNECT_DEFAULT_VALUE_PROP; static final String CONNECT_PARAMETERS_PROP; static final String CONNECT_INTERNAL_TYPE_NAME; static final String AVRO_RECORD_DOC_PROP; static final String AVRO_ENUM_DOC_PREFIX_PROP; static final String AVRO_FIELD_DOC_PREFIX_PROP; static final String AVRO_FIELD_DEFAULT_FLAG_PROP; static final String AVRO_ENUM_DEFAULT_PREFIX_PROP; static final String CONNECT_TYPE_PROP; static final String CONNECT_TYPE_INT8; static final String CONNECT_TYPE_INT16; static final String AVRO_TYPE_UNION; static final String AVRO_TYPE_ENUM; static final String AVRO_TYPE_ANYTHING; static final org.apache.avro.Schema ANYTHING_SCHEMA_MAP_ELEMENT; static final org.apache.avro.Schema ANYTHING_SCHEMA; }