The most standard workaround for passing a dynamic list to an IN clause in systems that don't support array-type bind parameters (which includes current versions of Doris) is string interpolation to construct the SQL.
While you noted it's not ideal for safety, you must ensure the list of IDs is fully sanitized and cast to the expected type (e.g., all integers) before being interpolated into the query string. Alternatively, you could use a Doris function like ARRAY_CONTAINS on a temporary string or array column that stores the ID list, Bazoocam, but this typically involves more complex logic and potential performance trade-offs compared to safe string building for the IN clause.