Skip to content

Unexpected invocation of UDF #1763

@cxzl25

Description

@cxzl25

Describe the bug

Caused by: java.lang.RuntimeException: poll record batch error: Execution error: native execution panics: Execution error: Execution error: output_with_sender[Project] error: Execution error: output_with_sender[Project]: output() returns error: External error: Java exception thrown at native-engine/datafusion-ext-exprs/src/spark_udf_wrapper.rs:216: java.lang.RuntimeException: Error loading expression '/data/k1'
	at org.apache.auron.jni.JniBridge.nextBatch(Native Method)
	at org.apache.auron.jni.AuronCallNativeWrapper.loadNextBatch(AuronCallNativeWrapper.java:118)
	... 19 more

To Reproduce

create table tmp_xml ( id int ,c1 string) stored as parquet ;

insert overwrite table tmp_xml values (1,'a'),(5,'<'),(5,'<'),(5,'<'),(5,'<'),(5,'<'),(5,'<'),(2,'<data><k1>v1</k1></data>'),(3,'<daa>'),(4,'>'),(5,'<'),(5,'<'),(5,'<'),(5,'<'),(5,'<'),(5,'<');
select * , case when id=2 and xpath_string(c1,'/data/k1')= 'v1' then 'xml' else 'no_xml' end as extracted_value from tmp_xml;

Expected behavior

Screenshots

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions