Uploaded image for project: 'Ignite'
  1. Ignite
  2. IGNITE-15266

Python nested object arrays re-serialization failure

    XMLWordPrintableJSON

Details

    • Fixed nested object array deserialization
    • Release Notes Required

    Description

      When reading an object that contains an object array directly inside another object array from python, and attempting to write it back directly, the following error is raised:

        File ".../ignite-python-thin-client/pyignite/utils.py", line 69, in is_hinted
          return isinstance(value, tuple) and len(value) == 2 and issubclass(value[1], IgniteDataType)
      TypeError: issubclass() arg 1 must be a class
      

       

      Sample reproduction:

       

      from pyignite import Client
      from pyignite.datatypes import ObjectArrayObject
      ignite = Client()
      with ignite.connect('localhost', 10800):
          cache = ignite.get_or_create_cache('example')
          example_nested = ((ObjectArrayObject.OBJECT, [1]), ObjectArrayObject)
          example = (ObjectArrayObject.OBJECT, [example_nested])
          print(example) #                             (-1, [((-1, [1]), <class 'pyignite.datatypes.complex.ObjectArrayObject'>)])
          cache.put('example', example)
          print(cache.get('example')) #                (3, [(-1, [1])])
          cache.put('example', cache.get('example')) # TypeError: issubclass() arg 1 must be a class
          print(cache.get('example'))
      

       

       

      Attachments

        Issue Links

          Activity

            People

              bojidar-bg Bojidar Marinov
              bojidar-bg Bojidar Marinov
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 50m
                  50m