Uploaded image for project: 'Python Integrations'
  1. Python Integrations
  2. INTPYTHON-556

[pymongoarrow] Unsupported data type in schema

    • Type: Icon: Build Failure Build Failure
    • Resolution: Fixed
    • Priority: Icon: Unknown Unknown
    • pymongoarrow-1.7.1
    • Affects Version/s: None
    • Component/s: pymongoarrow
    • None
    • None
    • Python Drivers
    • Not Needed
    • Hide

      1. What would you like to communicate to the user about this feature?
      2. Would you like the user to see examples of the syntax and/or executable code and its output?
      3. Which versions of the driver/connector does this apply to?

      Show
      1. What would you like to communicate to the user about this feature? 2. Would you like the user to see examples of the syntax and/or executable code and its output? 3. Which versions of the driver/connector does this apply to?
    • None
    • None
    • None
    • None
    • None
    • None

      Polars 1.25 was released on March 15th.

       

      Unsupported data type "fixed_size_binary[8]" in schema

       

      https://github.com/mongodb-labs/mongo-arrow/actions/runs/13950122762/job/39047163266?pr=287

       

      
      =================================== FAILURES ===================================
      980______ TestExplicitPolarsApi.test_exceptions_for_unsupported_polar_types _______
      981
      982self = <test.test_polars.TestExplicitPolarsApi testMethod=test_exceptions_for_unsupported_polar_types>
      983
      984    def test_exceptions_for_unsupported_polar_types(self):
      985        """Confirm exceptions thrown are expected.
      986    
      987        Currently, pl.Series, and pl.Object
      988        Tracks future changes in any packages.
      989        """
      990    
      991        # Series:  PyMongoError does not support
      992        with self.assertRaises(ValueError) as exc:
      993            pls = pl.Series(values=range(2))
      994            write(self.coll, pls)
      995        self.assertTrue("Invalid tabular data object" in exc.exception.args[0])
      996    
      997        # Polars has an Object Type, similar in concept to Pandas
      998        class MyObject:
      999            pass
      1000    
      1001        with self.assertRaises(pl.exceptions.PanicException) as exc:
      1002            df_in = pl.DataFrame(data=[MyObject()] * 2)
      1003>           write(self.coll, df_in)
      1004
      1005test/test_polars.py:270: 
      1006_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
      1007pymongoarrow/api.py:467: in write
      1008    _validate_schema(tabular.schema.types)
      1009_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
      1010
      1011    def _validate_schema(schema):
      1012        for i in schema:
      1013            if not _in_type_map(i):
      1014                msg = f'Unsupported data type "{i}" in schema'
      1015>               raise ValueError(msg)
      1016E               ValueError: Unsupported data type "fixed_size_binary[8]" in schema
      1017
      1018pymongoarrow/types.py:339: ValueError 

            Assignee:
            steve.silvester@mongodb.com Steve Silvester
            Reporter:
            steve.silvester@mongodb.com Steve Silvester
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              None
              None
              None
              None