Uploaded image for project: 'Cassandra'
  1. Cassandra
  2. CASSANDRA-19118

Add support of vector type to COPY command

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Normal
    • Resolution: Fixed
    • 5.0-rc1, 5.0, 5.1
    • Tool/cqlsh
    • None

    Description

      Currently it's not possible to import rows with vector literals via COPY command.

      STR:

      • Create a table
        CREATE TABLE testcopyfrom (id text PRIMARY KEY, embedding_vector VECTOR<FLOAT, 6>
        
      • Prepare csv file with sample data, for instance:
        1,"[0.1, 0.2, 0.3, 0.4, 0.5, 0.6]"
        2,"[-0.1, -0.2, -0.3, -0.4, -0.5, -0.6]" 
      • in cqlsh run
        COPY ks.testcopyfrom FROM data.csv
        

      It will result in getting:

      TypeError: Received an argument of invalid type for column "embedding_vector". Expected: <class 'cassandra.cqltypes.VectorType(6)'>, Got: <class 'str'>; (required argument is not a float)

      Attachments

        Activity

          People

            szymon.miezal Szymon Miezal
            szymon.miezal Szymon Miezal
            Szymon Miezal
            Andres de la Peña, Maxwell Guo, Stefan Miklosovic
            Votes:
            0 Vote for this issue
            Watchers:
            6 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 - 10h 10m
                10h 10m