{"record":{"id":"da929cf2c4caf913","repo":"risingwavelabs/risingwave","slug":"lat-name-must-be-set-to-float64-or-float32","errorCode":null,"errorMessage":"`{LAT_NAME}` must be set to `float64` or `float32` or `varchar`","messagePattern":"`(.+?)` must be set to `float64` or `float32` or `varchar`","errorType":"validation","errorClass":"SinkError::Config","httpStatus":null,"severity":"error","filePath":"src/connector/src/sink/redis.rs","lineNumber":407,"sourceCode":"                    if let Some(lon_type) = all_map.get(lon_name)\n                        && (lon_type == &DataType::Float64\n                            || lon_type == &DataType::Float32\n                            || lon_type == &DataType::Varchar)\n                    {\n                        // do nothing\n                    } else {\n                        return Err(SinkError::Config(anyhow!(\n                            \"`{LON_NAME}` must be set to `float64` or `float32` or `varchar`\"\n                        )));\n                    }\n                    if let Some(lat_type) = all_map.get(lat_name)\n                        && (lat_type == &DataType::Float64\n                            || lat_type == &DataType::Float32\n                            || lat_type == &DataType::Varchar)\n                    {\n                        // do nothing\n                    } else {\n                        return Err(SinkError::Config(anyhow!(\n                            \"`{LAT_NAME}` must be set to `float64` or `float32` or `varchar`\"\n                        )));\n                    }\n                    if let Some(member_type) = pk_map.get(member_name)\n                        && member_type == &DataType::Varchar\n                    {\n                        // do nothing\n                    } else {\n                        return Err(SinkError::Config(anyhow!(\n                            \"`{MEMBER_NAME}` must be set to `varchar` and `primary_key`\"\n                        )));\n                    }\n                }\n                Some(REDIS_VALUE_TYPE_PUBSUB) => {\n                    let channel = self.format_desc.options.get(CHANNEL);\n                    let channel_column = self.format_desc.options.get(CHANNEL_COLUMN);\n                    if (channel.is_none() && channel_column.is_none())\n                        || (channel.is_some() && channel_column.is_some())","sourceCodeStart":389,"sourceCodeEnd":425,"githubUrl":"https://github.com/risingwavelabs/risingwave/blob/6469eb736d691e8e9b8a419a57edd6429ca77417/src/connector/src/sink/redis.rs#L389-L425","documentation":"For a Redis geospatial sink, the `latitude` option must point at a column whose type is float64, float32, or varchar. RedisSink::validate rejects the sink with this SinkError::Config when the referenced column is missing or has another type, because Redis GEOADD needs numeric latitude values.","triggerScenarios":"CREATE SINK with encode template, redis_value_type = 'geospatial', where the `latitude = '<col>'` option names a column not present in the schema or typed other than FLOAT64/FLOAT32/VARCHAR (src/connector/src/sink/redis.rs:400-410).","commonSituations":"Pointing `latitude` at an INTEGER/DECIMAL column; the latitude column dropped or renamed upstream; misspelling the column name so the schema lookup misses.","solutions":["Change the column type to DOUBLE (float64), REAL (float32), or VARCHAR","Or point `latitude` at an existing column of an allowed type","Verify the column name in the option matches the sink schema exactly"],"exampleFix":"-- before: latitude = 'lat_i' where lat_i is INTEGER\nALTER TABLE t ADD COLUMN lat DOUBLE;\n-- after\n... encode template (redis_value_type = 'geospatial', latitude = 'lat', ...)","handlingStrategy":"type-guard","validationCode":"-- guard before CREATE SINK:\n-- SELECT data_type FROM schema_of(t) WHERE name = options['latitude']\n-- allowed: 'double precision', 'real', 'character varying'","typeGuard":null,"tryCatchPattern":"match result.err() { Some(e) if e.contains(\"latitude\") => cast_column_to_double(), _ => propagate(result) }","preventionTips":["Declare latitude columns as DOUBLE or REAL at table creation time","Cast via an upstream materialized view if the raw column type differs","Verify option values match the sink schema column names"],"tags":["redis","sink","type-mismatch","geospatial"],"backgroundTag":"invalid-config-value","analyzedSha":"6469eb736d691e8e9b8a419a57edd6429ca77417","analyzedAt":"2026-09-11T21:06:21.487Z","contentChangedAt":"2026-09-11T21:06:21.487Z","schemaVersion":2},"datasetVersion":"2026-09-14T16:17:12.679Z"}