Github user tejasapatil commented on the issue:

    https://github.com/apache/spark/pull/17184
  
    Generated code (in case anyone reviewing the PR wants to see):
    
    ```
    /* 001 */ public Object generate(Object[] references) {
    /* 002 */   return new GeneratedIterator(references);
    /* 003 */ }
    /* 004 */
    /* 005 */ final class GeneratedIterator extends 
org.apache.spark.sql.execution.BufferedRowIterator {
    /* 006 */   private Object[] references;
    /* 007 */   private scala.collection.Iterator[] inputs;
    /* 008 */   private scala.collection.Iterator inputadapter_input;
    /* 009 */   private UTF8String.IntWrapper project_wrapper;
    /* 010 */   private UTF8String.LongWrapper project_wrapper1;
    /* 011 */   private UTF8String.IntWrapper project_wrapper2;
    /* 012 */   private UTF8String.IntWrapper project_wrapper3;
    /* 013 */   private UnsafeRow project_result;
    /* 014 */   private 
org.apache.spark.sql.catalyst.expressions.codegen.BufferHolder project_holder;
    /* 015 */   private 
org.apache.spark.sql.catalyst.expressions.codegen.UnsafeRowWriter 
project_rowWriter;
    /* 016 */
    /* 017 */   public GeneratedIterator(Object[] references) {
    /* 018 */     this.references = references;
    /* 019 */   }
    /* 020 */
    /* 021 */   public void init(int index, scala.collection.Iterator[] inputs) 
{
    /* 022 */     partitionIndex = index;
    /* 023 */     this.inputs = inputs;
    /* 024 */     inputadapter_input = inputs[0];
    /* 025 */     project_wrapper = new UTF8String.IntWrapper();
    /* 026 */     project_wrapper1 = new UTF8String.LongWrapper();
    /* 027 */     project_wrapper2 = new UTF8String.IntWrapper();
    /* 028 */     project_wrapper3 = new UTF8String.IntWrapper();
    /* 029 */     project_result = new UnsafeRow(4);
    /* 030 */     this.project_holder = new 
org.apache.spark.sql.catalyst.expressions.codegen.BufferHolder(project_result, 
0);
    /* 031 */     this.project_rowWriter = new 
org.apache.spark.sql.catalyst.expressions.codegen.UnsafeRowWriter(project_holder,
 4);
    /* 032 */
    /* 033 */   }
    /* 034 */
    /* 035 */   protected void processNext() throws java.io.IOException {
    /* 036 */     while (inputadapter_input.hasNext() && !stopEarly()) {
    /* 037 */       InternalRow inputadapter_row = (InternalRow) 
inputadapter_input.next();
    /* 038 */       boolean inputadapter_isNull = inputadapter_row.isNullAt(0);
    /* 039 */       UTF8String inputadapter_value = inputadapter_isNull ? null 
: (inputadapter_row.getUTF8String(0));
    /* 040 */
    /* 041 */       boolean project_isNull = inputadapter_isNull;
    /* 042 */       int project_value = -1;
    /* 043 */       if (!inputadapter_isNull) {
    /* 044 */         if (inputadapter_value.toInt(project_wrapper)) {
    /* 045 */           project_value = project_wrapper.value;
    /* 046 */         } else {
    /* 047 */           project_isNull = true;
    /* 048 */         }
    /* 049 */
    /* 050 */       }
    /* 051 */       boolean inputadapter_isNull1 = inputadapter_row.isNullAt(1);
    /* 052 */       UTF8String inputadapter_value1 = inputadapter_isNull1 ? 
null : (inputadapter_row.getUTF8String(1));
    /* 053 */       boolean project_isNull2 = inputadapter_isNull1;
    /* 054 */       long project_value2 = -1L;
    /* 055 */       if (!inputadapter_isNull1) {
    /* 056 */         if (inputadapter_value1.toLong(project_wrapper1)) {
    /* 057 */           project_value2 = project_wrapper1.value;
    /* 058 */         } else {
    /* 059 */           project_isNull2 = true;
    /* 060 */         }
    /* 061 */
    /* 062 */       }
    /* 063 */       boolean project_isNull4 = inputadapter_isNull;
    /* 064 */       byte project_value4 = (byte)-1;
    /* 065 */       if (!inputadapter_isNull) {
    /* 066 */         if (inputadapter_value.toByte(project_wrapper2)) {
    /* 067 */           project_value4 = (byte) project_wrapper2.value;
    /* 068 */         } else {
    /* 069 */           project_isNull4 = true;
    /* 070 */         }
    /* 071 */
    /* 072 */       }
    /* 073 */       boolean project_isNull6 = inputadapter_isNull;
    /* 074 */       short project_value6 = (short)-1;
    /* 075 */       if (!inputadapter_isNull) {
    /* 076 */         if (inputadapter_value.toShort(project_wrapper3)) {
    /* 077 */           project_value6 = (short) project_wrapper3.value;
    /* 078 */         } else {
    /* 079 */           project_isNull6 = true;
    /* 080 */         }
    /* 081 */
    /* 082 */       }
    /* 083 */       project_rowWriter.zeroOutNullBytes();
    /* 084 */
    /* 085 */       if (project_isNull) {
    /* 086 */         project_rowWriter.setNullAt(0);
    /* 087 */       } else {
    /* 088 */         project_rowWriter.write(0, project_value);
    /* 089 */       }
    /* 090 */
    /* 091 */       if (project_isNull2) {
    /* 092 */         project_rowWriter.setNullAt(1);
    /* 093 */       } else {
    /* 094 */         project_rowWriter.write(1, project_value2);
    /* 095 */       }
    /* 096 */
    /* 097 */       if (project_isNull4) {
    /* 098 */         project_rowWriter.setNullAt(2);
    /* 099 */       } else {
    /* 100 */         project_rowWriter.write(2, project_value4);
    /* 101 */       }
    /* 102 */
    /* 103 */       if (project_isNull6) {
    /* 104 */         project_rowWriter.setNullAt(3);
    /* 105 */       } else {
    /* 106 */         project_rowWriter.write(3, project_value6);
    /* 107 */       }
    /* 108 */       append(project_result);
    /* 109 */       if (shouldStop()) return;
    /* 110 */     }
    /* 111 */   }
    /* 112 */ }
    ```


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to