xiaojie19852006 opened a new issue, #10015:
URL: https://github.com/apache/incubator-gluten/issues/10015

   ### Backend
   
   VL (Velox)
   
   ### Bug description
   
   The same execution plan works for Parquet files but fails for ORC files, 
with the following error:
   Caused by: org.apache.gluten.exception.GlutenException: Exception: 
VeloxRuntimeError
   Error Source: RUNTIME
   Error Code: INVALID_STATE
   Reason: An unloaded lazy vector cannot be wrapped by two different top level 
vectors.
   Retriable: False
   Expression: dictionaryValues_->markAsContainingLazyAndWrapped()
   Context: Operator: FilterProject[2] 1
   Function: setInternalState
   File: 
/newdisk/xujie/addpatch-gluten/egluten/ep/build-velox/build/velox_ep/./velox/vector/DictionaryVector-inl.h
   Line: 36
   Stack trace:
   # 0  _ZN8facebook5velox7process10StackTraceC1Ei
   # 1  
_ZN8facebook5velox14VeloxExceptionC1EPKcmS3_St17basic_string_viewIcSt11char_traitsIcEES7_S7_S7_bNS1_4TypeES7_
   # 2  
_ZN8facebook5velox6detail14veloxCheckFailINS0_17VeloxRuntimeErrorEPKcEEvRKNS1_18VeloxCheckFailArgsET0_
   # 3  _ZN8facebook5velox16DictionaryVectorIdE16setInternalStateEv
   # 4  
_ZN8facebook5velox16DictionaryVectorIdEC1EPNS0_6memory10MemoryPoolEN5boost13intrusive_ptrINS0_6BufferEEEmSt10shared_ptrINS0_10BaseVectorEES9_RKNS0_17SimpleVectorStatsIdEESt8optionalIiESI_SH_IbESI_SI_
   # 5  
_ZN8facebook5velox10BaseVector16wrapInDictionaryEN5boost13intrusive_ptrINS0_6BufferEEES5_iSt10shared_ptrIS1_E
   # 6  
_ZN8facebook5velox4exec9wrapChildEiN5boost13intrusive_ptrINS0_6BufferEEERKSt10shared_ptrINS0_10BaseVectorEES5_
   # 7  
_ZN8facebook5velox4exec15projectChildrenERSt6vectorISt10shared_ptrINS0_10BaseVectorEESaIS5_EERKS7_RKS2_INS1_18IdentityProjectionESaISB_EEiRKN5boost13intrusive_ptrINS0_6BufferEEE
   # 8  
_ZN8facebook5velox4exec8Operator10fillOutputEiRKN5boost13intrusive_ptrINS0_6BufferEEERKSt6vectorISt10shared_ptrINS0_10BaseVectorEESaISC_EE
   # 9  _ZN8facebook5velox4exec13FilterProject9getOutputEv
   # 10 
_ZN8facebook5velox4exec6Driver11runInternalERSt10shared_ptrIS2_ERS3_INS1_13BlockingStateEERS3_INS0_9RowVectorEE
   # 11 
_ZN8facebook5velox4exec6Driver4nextERSt10shared_ptrINS1_13BlockingStateEE
   # 12 _ZN8facebook5velox4exec4Task4nextEPN5folly10SemiFutureINS3_4UnitEEE
   # 13 _ZN6gluten24WholeStageResultIterator4nextEv
   # 14 Java_org_apache_gluten_vectorized_ColumnarBat
   
   the plan==>
   {
     "relations": [
       {
         "root": {
           "input": {
             "project": {
               "common": {
                 "emit": {
                   "outputMapping": [1, 2]
                 }
               },
               "input": {
                 "aggregate": {
                   "common": {
                     "direct": {}
                   },
                   "input": {
                     "project": {
                       "common": {
                         "emit": {
                           "outputMapping": [2, 3]
                         }
                       },
                       "input": {
                         "filter": {
                           "common": {
                             "direct": {}
                           },
                           "input": {
                             "read": {
                               "common": {
                                 "direct": {}
                               },
                               "baseSchema": {
                                 "names": ["int_id", "vendor_name"],
                                 "struct": {
                                   "types": [
                                     {"fp64": {"nullability": 
"NULLABILITY_NULLABLE"}},
                                     {"string": {"nullability": 
"NULLABILITY_NULLABLE"}}
                                   ]
                                 },
                                 "columnTypes": ["NORMAL_COL", "NORMAL_COL"]
                               },
                               "advancedExtension": {
                                 "optimization": {
                                   "@type": "/google.protobuf.StringValue",
                                   "value": "isMergeTree=0\n"
                                 }
                               }
                             }
                           },
                           "condition": {
                             "singularOrList": {
                               "value": {
                                 "selection": {
                                   "directReference": 
{"structField":{"field":1}}
                                 }
                               },
                               "options": [
                                 {"literal":{"string":"中兴"}},
                                 {"literal":{"string":"华为"}},
                                 {"literal":{"string":"爱立信"}},
                                 {"literal":{"string":"诺基亚"}}
                               ]
                             }
                           }
                         }
                       },
                       "expressions": [
                         {"selection":{"directReference":{"structField":{}}}},
                         {"selection":{"directReference":{"structField":{}}}}
                       ]
                     }
                   },
                   "groupings": [
                     {"groupingExpressions": 
[{"selection":{"directReference":{"structField":{"field":1}}}}]}
                   ],
                   "advancedExtension": {
                     "optimization": {
                       "@type": "/google.protobuf.StringValue",
                       "value": "isStreaming=0\nallowFlush=1\n"
                     }
                   }
                 }
               },
               "expressions": [
                 {
                   "scalarFunction": {
                     "outputType": 
{"i32":{"nullability":"NULLABILITY_REQUIRED"}},
                     "arguments": [
                       {"value":{"literal":{"i32":42}}},
                       
{"value":{"selection":{"directReference":{"structField":{}}}}
                     ]
                   }
                 },
                 {"selection":{"directReference":{"structField":{}}}}
               ]
             }
           },
           "names": [
             "hash_partition_key#1482",
             "int_id#1474",
             "hash_partition_key#1482",
             "int_id#1474"
           ]
         }
       }
     ]
   }
   
   ### Gluten version
   
   _No response_
   
   ### Spark version
   
   None
   
   ### Spark configurations
   
   _No response_
   
   ### System information
   
   _No response_
   
   ### Relevant logs
   
   ```bash
   
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


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

Reply via email to