You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@drill.apache.org by "Jimmy Cooksey (Jira)" <ji...@apache.org> on 2020/09/30 18:03:00 UTC

[jira] [Created] (DRILL-7792) Avoid using convert_fromJSON operator in ParquetPushDownFilter

Jimmy Cooksey created DRILL-7792:
------------------------------------

             Summary: Avoid using convert_fromJSON operator in ParquetPushDownFilter
                 Key: DRILL-7792
                 URL: https://issues.apache.org/jira/browse/DRILL-7792
             Project: Apache Drill
          Issue Type: Bug
          Components: Storage - Parquet
    Affects Versions: 1.17.0
            Reporter: Jimmy Cooksey


A query against parquet files that uses convert_fromJSON in a subquery with a WHERE clause in the outer query will throw an exception.  For example:
{quote}{color:#172b4d}{{SELECT t1.j.user_name AS user_name, t1.j.country_name AS country_name, t1.j.city_name AS city_name FROM}}{color}
{color:#172b4d}{{(SELECT CONVERT_FROM(`json_data`, 'json') AS j FROM az.`users/`) AS t1 
WHERE t1.j.city_name = 'Houston';}}{color}

{color:#de350b} {{Error: SYSTEM ERROR: ClassCastException: org.apache.drill.common.expression.FunctionCall cannot be cast to org.apache.drill.common.expression.SchemaPath
}}{color}
{quote}
Adding "convert_fromjson" to the BANNED_OPERATORS collection in ParquetPushDownFilter.java makes this error go away.  I would like to open a pull request for this if the change is ok.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)