Why do my AVRO dimensions get ingested as strings?

A community member set up a Kafka ingestion using AVRO encoding, and noticed that the resulting Druid types were strings. This is because:

Auto field discovery will automatically create a string dimension for every (non-timestamp) primitive or list of primitives, as well as any flatten expressions defined in the flattenSpec.

If you’d like Druid types other than strings, you have to explicitly specify the types in the dimensionsSpec. Here’s a bit of context.