Class FieldValueNormalizer


  • public final class FieldValueNormalizer
    extends Object
    Normalizes Gremlin result field values so row writers can handle both valueMap-style results (Map with ArrayList values) and project().by()-style results (Map with scalar or Map values) without ClassCastException.
    • Method Detail

      • toValueList

        public static List<Object> toValueList​(Object fieldValue)
        Converts a raw field value from a Gremlin result into a list suitable for row writers. Handles: valueMap() lists, project().by() scalars, and .by(valueMap()) Map values (e.g. all_properties).
        Parameters:
        fieldValue - raw value (may be List, Map, scalar, or null)
        Returns:
        null if fieldValue is null; otherwise a list of one or more elements that can be read by row writers (Map is serialized to string)