Uploaded image for project: 'Thrift'
  1. Thrift
  2. THRIFT-27

Generated erlang types don't contain default values for records

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 0.7
    • Erlang - Compiler
    • None
    • commit 289ec8413908ca2e5245641029b719909483adf5

    Description

      When generating code for the following structure:

      struct ColumnDescriptor {
        1:Text name,
        2:i32 maxVersions = 3,
        3:string compression = "NONE",
        4:bool inMemory = 0,
        5:i32 maxValueLength = 2147483647,
        6:string bloomFilterType = "NONE",
        7:i32 bloomFilterVectorSize = 0,
        8:i32 bloomFilterNbHashes = 0
      }
      

      the generated record is:

      -record(columnDescriptor, {name, maxVersions, compression, inMemory, maxValueLength, bloomFilterType, bloomFilterVectorSize, bloomFilterNbHashes}).
      

      The generated record should have default values added.

      Attachments

        1. diff.txt
          9 kB
          Anatoly Kanivetsky
        2. diff.txt
          9 kB
          Anatoly Kanivetsky

        Activity

          People

            chaos-ad Anatoly Kanivetsky
            tlipcon Todd Lipcon
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 2h
                2h
                Remaining:
                Remaining Estimate - 2h
                2h
                Logged:
                Time Spent - Not Specified
                Not Specified