Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-14185

Make indentation of debug log for generated code proper

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Trivial
    • Resolution: Fixed
    • 2.0.0
    • None
    • SQL
    • None

    Description

      The indentation of debug log output by `CodeGenerator` is weird.
      The first line of the generated code should be put on the next line of the first line of the log message.

      16/03/28 11:10:24 DEBUG CodeGenerator: /* 001 */                                                                                                              
      /* 002 */ public java.lang.Object generate(Object[] references) {
      /* 003 */   return new SpecificSafeProjection(references); 
      ...
      

      After this patch is applied, we get debug log like as follows.

      16/03/28 10:45:50 DEBUG CodeGenerator:                                                 
      /* 001 */ 
      /* 002 */ public java.lang.Object generate(Object[] references) {
      /* 003 */   return new SpecificSafeProjection(references);
      ...
      

      Attachments

        Activity

          People

            sarutak Kousuke Saruta
            sarutak Kousuke Saruta
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: