[
https://issues.apache.org/jira/browse/DRILL-3314?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14592489#comment-14592489
]
Rahul Challapalli commented on DRILL-3314:
------------------------------------------
The below error could also be because of the same reason
{code}
select ca_address_sk, char_length(regexp_extract(ca_street_name, 'W(.*)nd', 1))
from hive.tpcds01_text.customer_address;
Error: SYSTEM ERROR: org.apache.drill.exec.exception.SchemaChangeException:
Failure while trying to materialize incoming schema. Errors:
Error in expression at index -1. Error: Missing function implementation:
[char_length(VAR16CHAR-OPTIONAL)]. Full expression: --UNKNOWN EXPRESSION--..
Fragment 0:0
[Error Id: 325c7c94-6d64-4a8d-9b6f-f4abfc8d33e3 on qa-node190.qa.lab:31010]
(state=,code=0)
{code}
It works without the char_length function.
> Casting the output of xpath_string hive function results in a function not
> found error
> --------------------------------------------------------------------------------------
>
> Key: DRILL-3314
> URL: https://issues.apache.org/jira/browse/DRILL-3314
> Project: Apache Drill
> Issue Type: Bug
> Components: Functions - Hive
> Reporter: Rahul Challapalli
> Assignee: Mehant Baid
> Fix For: 1.1.0
>
> Attachments: error.log
>
>
> git.commit.id.abbrev=4baf9e7
> The below query works :
> {code}
> select xpath_string ('<a><b id="5"><c/></b><b
> id="2"><c/></b></a>','/descendant::c/ancestor::b/@id') from
> dfs.`cross-sources`.`fewtypes_null.parquet` limit 1;
> +---------+
> | EXPR$0 |
> +---------+
> | 5 |
> +---------+
> {code}
> However when I try to add a cast to the above query, it fails
> {code}
> select cast(xpath_string ('<a><b id="5"><c/></b><b
> id="2"><c/></b></a>','/descendant::c/ancestor::b/@id') as int) from
> dfs.`cross-sources`.`fewtypes_null.parquet` limit 1;
> Error: SYSTEM ERROR: org.apache.drill.exec.exception.SchemaChangeException:
> Failure while trying to materialize incoming schema. Errors:
>
> Error in expression at index -1. Error: Missing function implementation:
> [castBIGINT(VAR16CHAR-OPTIONAL)]. Full expression: --UNKNOWN EXPRESSION--..
> Fragment 0:0
> [Error Id: 4037a41e-73c8-4a6b-a5d2-b5a949aba933 on qa-node190.qa.lab:31010]
> (state=,code=0)
> {code}
> I attached the log file. Let me know if you need anything more.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)