class_docstr: These test cases exercise the interface to the proto plan
  generation but do not call Spark.
class_docstr_tok: ["These","test","cases","exercise","the","interface","to","the","proto","plan","generation","but","do","not","call","Spark","."]
code: def test_unpivot(self):
      df = self.connect.readTable(table_name=self.tbl_name)
  
      plan = (
          df.filter(df.col_name > 3)
          .unpivot(["id"], ["name"], "variable", "value")
          ._plan.to_proto(self.connect)
      )
      self.assertTrue(
          all(
              isinstance(c, proto.Expression)
              for c in plan.root.unpivot.ids
          )
      )
      self.assertEqual(
          plan.root.unpivot.ids[
              0
          ].unresolved_attribute.unparsed_identifier,
          "id",
      )
      self.assertEqual(plan.root.unpivot.HasField("values"), True)
      self.assertTrue(
          all(
              isinstance(c, proto.Expression)
              for c in plan.root.unpivot.values.values
          )
      )
      self.assertEqual(
          plan.root.unpivot.values.values[
              0
          ].unresolved_attribute.unparsed_identifier,
          "name",
      )
      self.assertEqual(
          plan.root.unpivot.variable_column_name, "variable"
      )
      self.assertEqual(plan.root.unpivot.value_column_name, "value")
  
      plan = (
          df.filter(df.col_name > 3)
          .unpivot(["id"], None, "variable", "value")
          ._plan.to_proto(self.connect)
      )
      self.assertTrue(len(plan.root.unpivot.ids) == 1)
      self.assertTrue(
          all(
              isinstance(c, proto.Expression)
              for c in plan.root.unpivot.ids
          )
      )
      self.assertEqual(
          plan.root.unpivot.ids[
              0
          ].unresolved_attribute.unparsed_identifier,
          "id",
      )
      self.assertEqual(plan.root.unpivot.HasField("values"), False)
      self.assertEqual(
          plan.root.unpivot.variable_column_name, "variable"
      )
      self.assertEqual(plan.root.unpivot.value_column_name, "value")
  
imports: import unittest
  import uuid
  import datetime
  import decimal
  import math
  from pyspark.testing.connectutils import PlanOnlyTestFixture, should_test_connect, connect_requirement_message
  from pyspark.errors import PySparkValueError
label_desc: Use image node_id 11 for calling the SparkConnectPlanTests obj's underlying member method code with example usage: obj.test_unpivot() without return types