DRILL-2173: Partition queries to drive dynamic pruning
Adds new interface on the QueryContext as well as individual schemas for exploring partitions of tables.
Adds injectable type for partition explorer for use in UDFs. This is hooked into both to expression
materialization and interpreted evaluation. The FragmentContext throws an exception to tell users to turn on
constant folding if a UDF that uses the PartitionExplorer makes it past planning.
2173 update -Address Chris' review comments.
Change the PartitionExplorer to return an Iterable<String> instead of String[]
Add interface level description to PartitionExplorer and StoragePluginPartitionExplorer.
New inner class in FileSystemPlugin to fulfill the new Iterable interface for partitions.
Formatting/cleanup fixes
Clean up error reporting code in MaxDir UDF. Remove method to get a string from a DrillBuf, as it was already defined in StringFunctionHelpers. Add new utility method to specifically convert a VarCharHolder to a string to remove some boilerplate.
Fixed an errant copy paste in a comment and removed unused imports.
Fix docs in FileSystemPlugin, belongs with the 2173 changes.
Fix references in Javadoc to properly use @link instead of @see.
2173 fixes, correctly return an empty list of sub-partitions if the path requested in the partition explorer interface is a file. Fix a few docs.
More 2173, finishing Chris' comments
2173 update - Add validation for PartitionExplorer injectable in UdfUtiltiers.
small change to fix refactored unit tests.
cleanup for 2173
Fix maxdir UDF so it can compile in runtime generated code as well as the interpreted expression system (needed to fully qualify classes and interfaces). It still fails to execute, as we prevent requesting a schema from a non-root fragment. We do not expect these types of functions to ever be used without constant folding so this should not be an issue.
Update error message in the case where the partition explorer is being used outside of planning.
Adding free marker generated maxdir, imaxdir, mindir and imindir
remove import that violates build checks, fix typo in new test class name
Separate out SubDirectoryList from FileSystemSchemaFactory.
Fix unit test to correctly test all four functions.
Update partition explorer to take List instead of Collection. As the lists are used in parallel it should be explicit that these are expected to be ordered (which Collections do not guarantee).
Drop the extra file generated due to the header in the free marker template and fix a typo and remove an unused import.