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

Generated erlang types don't contain default values for records

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.7
    • Component/s: Erlang - Compiler
    • Labels:
      None
    • Environment:

      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

            • Assignee:
              chaos-ad Anatoly Kanivetsky
              Reporter:
              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