Investigate the current implementation of CAST in StarRocks, likely in fe/fe core/src/main/java/com/starrocks/sql/ast/ or similar. Examine how other data types (e.g., to json) are handled. Check discussions in the issue comments for any design decisions. Implement the cast logic for struct, array, and map types to JSON.
Support casting struct/array/map to JSON · StarRocks/starrocks#66720 | Good First Issue