Uploaded image for project: 'Documentation'
  1. Documentation
  2. DOCS-9294

Documentation for BI-762: Column types should emulate MySQL types

    XMLWordPrintableJSON

Details

    • Icon: Task Task
    • Resolution: Done
    • Icon: Major - P3 Major - P3
    • None
    • None
    • None
    • None

    Description

      Engineering Ticket Description:

      Given this DRDL:

      schema:
      - db: test
        tables:
        - table: numeric
          collection: numeric
          pipeline: []
          columns:
          - Name: _id
            MongoType: bson.ObjectId
            SqlName: _id
            SqlType: varchar
          - Name: d
            MongoType: bson.Decimal128
            SqlName: d
            SqlType: decimal128
          - Name: f
            MongoType: float64
            SqlName: f
            SqlType: float64
          - Name: i
            MongoType: int
            SqlName: i
            SqlType: int
          - Name: l
            MongoType: int64
            SqlName: l
            SqlType: int64
          - Name: m
            MongoType: number
            SqlName: m
            SqlType: numeric
      

      the column types in the information schema look like this:

      mysql> show columns from numeric;
      +-------+------------+------+------+---------+-------+
      | Field | Type       | Null | Key  | Default | Extra |
      +-------+------------+------+------+---------+-------+
      | _id   | varchar    | YES  |      | NULL    |       |
      | d     | decimal128 | YES  |      | NULL    |       |
      | f     | float64    | YES  |      | NULL    |       |
      | i     | int        | YES  |      | NULL    |       |
      | l     | int64      | YES  |      | NULL    |       |
      | m     | numeric    | YES  |      | NULL    |       |
      +-------+------------+------+------+---------+-------+
      6 rows in set (0.02 sec)
      

      While we haven't seen problems with any tools as yet, it would be better if the column types reported here are named more similarly to the MySQL types.

      Attachments

        Activity

          People

            steve.renaker@mongodb.com Steve Renaker (Inactive)
            emily.hall Emily Hall
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              7 years, 14 weeks ago