[
https://issues.apache.org/jira/browse/DRILL-3623?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14950369#comment-14950369
]
ASF GitHub Bot commented on DRILL-3623:
---------------------------------------
Github user jacques-n commented on a diff in the pull request:
https://github.com/apache/drill/pull/193#discussion_r41628774
--- Diff:
exec/java-exec/src/main/java/org/apache/drill/exec/planner/sql/DirectPlan.java
---
@@ -45,11 +52,15 @@ public static PhysicalPlan
createDirectPlan(QueryContext context, boolean result
public static <T> PhysicalPlan createDirectPlan(QueryContext context, T
obj){
Iterator<T> iter = (Iterator<T>) Collections.singleton(obj).iterator();
return createDirectPlan(context.getCurrentEndpoint(), iter, (Class<T>)
obj.getClass());
+ }
+ public static <T> PhysicalPlan createDirectPlan(DrillbitEndpoint
endpoint, Iterator<T> iterator, Class<T> clazz) {
+ PojoRecordReader<T> reader = new PojoRecordReader<>(clazz, iterator);
+ return createDirectPlan(endpoint, reader, ScanStats.TRIVIAL_TABLE);
}
- public static <T> PhysicalPlan createDirectPlan(DrillbitEndpoint
endpoint, Iterator<T> iterator, Class<T> clazz){
- PojoRecordReader<T> reader = new PojoRecordReader<T>(clazz, iterator);
- DirectGroupScan scan = new DirectGroupScan(reader);
+
+ public static PhysicalPlan createDirectPlan(DrillbitEndpoint endpoint,
RecordReader reader, ScanStats stats) {
--- End diff --
Let's keep the default behavior static constructor (which uses trivial) and
then we don't have to update the constructor everywhere.
> Hive query hangs with limit 0 clause
> ------------------------------------
>
> Key: DRILL-3623
> URL: https://issues.apache.org/jira/browse/DRILL-3623
> Project: Apache Drill
> Issue Type: Bug
> Components: Storage - Hive
> Affects Versions: 1.1.0
> Environment: MapR cluster
> Reporter: Andries Engelbrecht
> Fix For: Future
>
>
> Running a select * from hive.table limit 0 does not return (hangs).
> Select * from hive.table limit 1 works fine
> Hive table is about 6GB with 330 files with parquet using snappy compression.
> Data types are int, bigint, string and double.
> Querying directory with parquet files through the DFS plugin works fine
> select * from dfs.root.`/user/hive/warehouse/database/table` limit 0;
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)