def create_sql_metadata(function_metadata: FunctionMetadata) -> SQLMetadata:
    """
    Create SQL body for creating the function in Unity Catalog.

    Args:
        function_metadata: The metadata of the function.

    Returns:
        SQLMetadata object containing the metadata for sql body creation.
    """
    sql_params = []
    for param_info in function_metadata.parameters:
        sql_param_parts = [param_info["name"], param_info["sql_type"]]
        if param_info["parameter_default"] is not None:
            sql_param_parts.append(f"DEFAULT {param_info['parameter_default']}")
        if param_info["comment"]:
            sql_param_parts.append(f"COMMENT '{param_info['comment']}'")
        sql_param = " ".join(sql_param_parts)
        sql_params.append(sql_param)

    indented_body = indent(function_metadata.function_body, " " * function_metadata.indent_unit)

    func_comment = function_metadata.docstring_info.description.replace("'", '"')

    return SQLMetadata(sql_params, func_comment, indented_body)

    Create SQL body for creating the function in Unity Catalog.

    Args:
        function_metadata: The metadata of the function.

    Returns:
        SQLMetadata object containing the metadata for sql body creation.
    
ai/core/src/unitycatalog/ai/core/utils/callable_utils.py