{
  "comment" : "This is generated by ESQL's AbstractFunctionTestCase. Do not edit it. See ../README.md for how to regenerate it.",
  "type" : "scalar",
  "name" : "copy_sign",
  "description" : "Returns a value with the magnitude of the first argument and the sign of the second argument.\nThis function is similar to Java's Math.copySign(double magnitude, double sign) which is\nsimilar to `copysign` from IEEE 754.",
  "signatures" : [
    {
      "params" : [
        {
          "name" : "magnitude",
          "type" : "double",
          "optional" : false,
          "description" : "The expression providing the magnitude of the result. Must be a numeric type."
        },
        {
          "name" : "sign",
          "type" : "double",
          "optional" : false,
          "description" : "The expression providing the sign of the result. Must be a numeric type."
        }
      ],
      "variadic" : false,
      "returnType" : "double"
    },
    {
      "params" : [
        {
          "name" : "magnitude",
          "type" : "double",
          "optional" : false,
          "description" : "The expression providing the magnitude of the result. Must be a numeric type."
        },
        {
          "name" : "sign",
          "type" : "integer",
          "optional" : false,
          "description" : "The expression providing the sign of the result. Must be a numeric type."
        }
      ],
      "variadic" : false,
      "returnType" : "double"
    },
    {
      "params" : [
        {
          "name" : "magnitude",
          "type" : "double",
          "optional" : false,
          "description" : "The expression providing the magnitude of the result. Must be a numeric type."
        },
        {
          "name" : "sign",
          "type" : "long",
          "optional" : false,
          "description" : "The expression providing the sign of the result. Must be a numeric type."
        }
      ],
      "variadic" : false,
      "returnType" : "double"
    },
    {
      "params" : [
        {
          "name" : "magnitude",
          "type" : "integer",
          "optional" : false,
          "description" : "The expression providing the magnitude of the result. Must be a numeric type."
        },
        {
          "name" : "sign",
          "type" : "double",
          "optional" : false,
          "description" : "The expression providing the sign of the result. Must be a numeric type."
        }
      ],
      "variadic" : false,
      "returnType" : "integer"
    },
    {
      "params" : [
        {
          "name" : "magnitude",
          "type" : "integer",
          "optional" : false,
          "description" : "The expression providing the magnitude of the result. Must be a numeric type."
        },
        {
          "name" : "sign",
          "type" : "integer",
          "optional" : false,
          "description" : "The expression providing the sign of the result. Must be a numeric type."
        }
      ],
      "variadic" : false,
      "returnType" : "integer"
    },
    {
      "params" : [
        {
          "name" : "magnitude",
          "type" : "integer",
          "optional" : false,
          "description" : "The expression providing the magnitude of the result. Must be a numeric type."
        },
        {
          "name" : "sign",
          "type" : "long",
          "optional" : false,
          "description" : "The expression providing the sign of the result. Must be a numeric type."
        }
      ],
      "variadic" : false,
      "returnType" : "integer"
    },
    {
      "params" : [
        {
          "name" : "magnitude",
          "type" : "long",
          "optional" : false,
          "description" : "The expression providing the magnitude of the result. Must be a numeric type."
        },
        {
          "name" : "sign",
          "type" : "double",
          "optional" : false,
          "description" : "The expression providing the sign of the result. Must be a numeric type."
        }
      ],
      "variadic" : false,
      "returnType" : "long"
    },
    {
      "params" : [
        {
          "name" : "magnitude",
          "type" : "long",
          "optional" : false,
          "description" : "The expression providing the magnitude of the result. Must be a numeric type."
        },
        {
          "name" : "sign",
          "type" : "integer",
          "optional" : false,
          "description" : "The expression providing the sign of the result. Must be a numeric type."
        }
      ],
      "variadic" : false,
      "returnType" : "long"
    },
    {
      "params" : [
        {
          "name" : "magnitude",
          "type" : "long",
          "optional" : false,
          "description" : "The expression providing the magnitude of the result. Must be a numeric type."
        },
        {
          "name" : "sign",
          "type" : "long",
          "optional" : false,
          "description" : "The expression providing the sign of the result. Must be a numeric type."
        }
      ],
      "variadic" : false,
      "returnType" : "long"
    }
  ],
  "examples" : [
    "FROM employees\n| EVAL cs1 = COPY_SIGN(salary, LEAST(salary_change))"
  ],
  "preview" : false,
  "snapshot_only" : false
}
