AnsweredAssumed Answered

Drill - Using "dir2" variable causes UnsupportedOperationException

Question asked by john.humphreys on Jan 29, 2018
Latest reply on Jan 29, 2018 by john.humphreys

For some reason on a path like this (with multiple numerically versioned sub-directories holding parquet files under them):

 

/data/AMPHADP21/metrics/dev/maas/data/parquet-aggregation/drill-hour/2018/01/26

 

This query works fine:

 

SELECT distinct epoch_hour, concat(dir0, '-', dir1, '-', dir2, '-', dir3) as origin
FROM dfs.`/nmr/eis/sysm/pmp/work/dev/maas/parquet-aggregation/drill-hour/`
where
dir0 = '2018' and dir1 = '01'
and dir3 = MAXDIR('dfs', concat('/nmr/eis/sysm/pmp/work/dev/maas/parquet-aggregation/drill-hour/', dir0, '/', dir1, '/', dir2, '/'))

 

And this one fails:

 

SELECT distinct epoch_hour, concat(dir0, '-', dir1, '-', dir2, '-', dir3) as origin
FROM dfs.`/nmr/eis/sysm/pmp/work/dev/maas/parquet-aggregation/drill-hour/`
where
dir0 = '2018' and dir1 = '01' and dir2 = '26'
and dir3 = MAXDIR('dfs', concat('/nmr/eis/sysm/pmp/work/dev/maas/parquet-aggregation/drill-hour/', dir0, '/', dir1, '/', dir2, '/'))

 

With this error:

 

SYSTEM ERROR: UnsupportedOperationException: The partition explorer interface can only be used in functions that can be evaluated at planning time. Make sure that the planner.enable_constant_folding configuration option is set to true.

Fragment 0:0

[Error Id: 73c0a07e-2218-4bcc-b6ad-153fba7f66a4 on psclxcpdevsys10.nomura.com:31010]

Outcomes