[jira] [Commented] (DRILL-4642) Let RexBuilder.ensureType() mechanism take place during Rex conversion.

2022-06-16 Thread ASF GitHub Bot (Jira)


[ 
https://issues.apache.org/jira/browse/DRILL-4642?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17555189#comment-17555189
 ] 

ASF GitHub Bot commented on DRILL-4642:
---

hsuanyi closed pull request #489: DRILL-4642: Remove customized 
RexBuilder.ensureType()
URL: https://github.com/apache/drill/pull/489




> Let RexBuilder.ensureType() mechanism take place during Rex conversion.
> ---
>
> Key: DRILL-4642
> URL: https://issues.apache.org/jira/browse/DRILL-4642
> Project: Apache Drill
>  Issue Type: Bug
>  Components: Query Planning & Optimization
>Reporter: Sean Hsuan-Yi Chu
>Assignee: Jinfeng Ni
>Priority: Major
> Fix For: Future
>
>
> In DRILL-4372, the logic of ensuring same type is removed since, in some case 
> such as below, undesirable cast function will be added and cause failure.
> {code}
> SELECT * 
> FROM T 
> WHERE (cast(col1 as timestamp)  - to_timestamp(col2,'-MM-dd HH:mm:ss') < 
> interval 'X XX:XX:XX' day to second)
> {code}
> The fundamental reason for this behavior roots in Drill-Calcite [1], where 
> SqlNode WHERE is expanded to a new object but is not passed into validation 
> step.
> [1] 
> https://github.com/mapr/incubator-calcite/blob/DrillCalcite1.4.0-mapr-1.4.0/core/src/main/java/org/apache/calcite/sql/validate/SqlValidatorImpl.java#L3362



--
This message was sent by Atlassian Jira
(v8.20.7#820007)


[jira] [Commented] (DRILL-3751) Query hang when zookeeper is stopped

2022-06-16 Thread ASF GitHub Bot (Jira)


[ 
https://issues.apache.org/jira/browse/DRILL-3751?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17555187#comment-17555187
 ] 

ASF GitHub Bot commented on DRILL-3751:
---

hsuanyi closed pull request #248: DRILL-3751: Reduce zookeeper's retry time to 
10
URL: https://github.com/apache/drill/pull/248




> Query hang when zookeeper is stopped
> 
>
> Key: DRILL-3751
> URL: https://issues.apache.org/jira/browse/DRILL-3751
> Project: Apache Drill
>  Issue Type: Bug
>  Components: Execution - Flow
>Affects Versions: 1.2.0
> Environment: 4 node cluster on CentOS
>Reporter: Khurram Faraaz
>Priority: Critical
> Fix For: Future
>
>
> I see an indefinite hang on sqlline prompt, issue a long running query and 
> then stop zookeeper process when the query is still being executed. Sqlline 
> prompt is never returned and it hangs showing the below stack trace. I am on 
> master.
> Steps to reproduce the problem
> clush -g khurram service mapr-warden stop
> clush -g khurram service mapr-warden start
> Issue long running query from sqlline
> While query is running, stop zookeeper using script.
> To stop zookeeper 
> {code}
> [root@centos-01 bin]# ./zkServer.sh stop
> JMX enabled by default
> Using config: /opt/mapr/zookeeper/zookeeper-3.4.5/bin/../conf/zoo.cfg
> Stopping zookeeper ... STOPPED
> {code}
> Issue below long running query from sqlline
> {code}
> ./sqlline -u "jdbc:drill:schema=dfs.tmp"
> 0: jdbc:drill:schema=dfs.tmp> select * from `twoKeyJsn.json` limit 800;
> ...
> | 7.40907649723E8  | g|
> | 1.12378007695E9  | d|
> 03:03:28.482 [CuratorFramework-0] ERROR org.apache.curator.ConnectionState - 
> Connection timed out for connection string (10.10.100.201:5181) and timeout 
> (5000) / elapsed (5013)
> org.apache.curator.CuratorConnectionLossException: KeeperErrorCode = 
> ConnectionLoss
>   at 
> org.apache.curator.ConnectionState.checkTimeouts(ConnectionState.java:198) 
> [curator-client-2.5.0.jar:na]
>   at 
> org.apache.curator.ConnectionState.getZooKeeper(ConnectionState.java:88) 
> [curator-client-2.5.0.jar:na]
>   at 
> org.apache.curator.CuratorZookeeperClient.getZooKeeper(CuratorZookeeperClient.java:115)
>  [curator-client-2.5.0.jar:na]
>   at 
> org.apache.curator.framework.imps.CuratorFrameworkImpl.performBackgroundOperation(CuratorFrameworkImpl.java:807)
>  [curator-framework-2.5.0.jar:na]
>   at 
> org.apache.curator.framework.imps.CuratorFrameworkImpl.backgroundOperationsLoop(CuratorFrameworkImpl.java:793)
>  [curator-framework-2.5.0.jar:na]
>   at 
> org.apache.curator.framework.imps.CuratorFrameworkImpl.access$400(CuratorFrameworkImpl.java:57)
>  [curator-framework-2.5.0.jar:na]
>   at 
> org.apache.curator.framework.imps.CuratorFrameworkImpl$4.call(CuratorFrameworkImpl.java:275)
>  [curator-framework-2.5.0.jar:na]
>   at java.util.concurrent.FutureTask.run(FutureTask.java:262) 
> [na:1.7.0_45]
>   at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
>  [na:1.7.0_45]
>   at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
>  [na:1.7.0_45]
>   at java.lang.Thread.run(Thread.java:744) [na:1.7.0_45]
> {code}
> Here is the stack for sqlline process
> {code}
> [root@centos-01 bin]# /usr/java/jdk1.7.0_45/bin/jstack 32136
> 2015-09-05 03:21:52
> Full thread dump Java HotSpot(TM) 64-Bit Server VM (24.45-b08 mixed mode):
> "Attach Listener" daemon prio=10 tid=0x7f8328003800 nid=0x27f1 waiting on 
> condition [0x]
>java.lang.Thread.State: RUNNABLE
> "CuratorFramework-0-EventThread" daemon prio=10 tid=0x012fd800 
> nid=0x26e1 waiting on condition [0x7f8317c2e000]
>java.lang.Thread.State: WAITING (parking)
>   at sun.misc.Unsafe.park(Native Method)
>   - parking to wait for  <0x0007e2117798> (a 
> java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
>   at java.util.concurrent.locks.LockSupport.park(LockSupport.java:186)
>   at 
> java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2043)
>   at 
> java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:442)
>   at org.apache.zookeeper.ClientCnxn$EventThread.run(ClientCnxn.java:491)
> "CuratorFramework-0-SendThread(centos-01.qa.lab:5181)" daemon prio=10 
> tid=0x01109800 nid=0x26e0 waiting on condition [0x7f8317b2d000]
>java.lang.Thread.State: TIMED_WAITING (sleeping)
>   at java.lang.Thread.sleep(Native Method)
>   at 
> org.apache.zookeeper.client.StaticHostProvider.next(StaticHostProvider.java:86)
>   at 
> org.apache.zookeeper.ClientCnxn$SendThread.startConnect(ClientCnxn.java:937)
>   at org.apache.zookeeper.ClientCnxn$SendTh

[jira] [Commented] (DRILL-2139) Star is not expanded correctly in "select distinct" query

2022-06-16 Thread ASF GitHub Bot (Jira)


[ 
https://issues.apache.org/jira/browse/DRILL-2139?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17555186#comment-17555186
 ] 

ASF GitHub Bot commented on DRILL-2139:
---

hsuanyi closed pull request #237: DRILL-2139: Support distinct over star column
URL: https://github.com/apache/drill/pull/237




> Star is not expanded correctly in "select distinct" query
> -
>
> Key: DRILL-2139
> URL: https://issues.apache.org/jira/browse/DRILL-2139
> Project: Apache Drill
>  Issue Type: Bug
>  Components: Query Planning & Optimization
>Affects Versions: 0.8.0
>Reporter: Victoria Markman
>Assignee: Sean Hsuan-Yi Chu
>Priority: Critical
> Fix For: Future
>
>
> {code}
> 0: jdbc:drill:schema=dfs> select distinct * from t1;
> ++
> | *  |
> ++
> | null   |
> ++
> 1 row selected (0.14 seconds)
> 0: jdbc:drill:schema=dfs> select distinct * from `test.json`;
> ++
> | *  |
> ++
> | null   |
> ++
> 1 row selected (0.163 seconds)
> {code}



--
This message was sent by Atlassian Jira
(v8.20.7#820007)


[jira] [Commented] (DRILL-4147) Union All operator runs in a single fragment

2022-06-16 Thread ASF GitHub Bot (Jira)


[ 
https://issues.apache.org/jira/browse/DRILL-4147?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17555188#comment-17555188
 ] 

ASF GitHub Bot commented on DRILL-4147:
---

hsuanyi closed pull request #288: DRILL-4147: Change UnionPrel's 
DrillDistributionTrait to be ANY to al…
URL: https://github.com/apache/drill/pull/288




> Union All operator runs in a single fragment
> 
>
> Key: DRILL-4147
> URL: https://issues.apache.org/jira/browse/DRILL-4147
> Project: Apache Drill
>  Issue Type: Bug
>Reporter: amit hadke
>Assignee: Aman Sinha
>Priority: Major
> Fix For: 1.8.0
>
>
> A User noticed that running select  from a single directory is much faster 
> than union all on two directories.
> (https://drill.apache.org/blog/2014/12/09/running-sql-queries-on-amazon-s3/#comment-2349732267)
>  
> It seems like UNION ALL operator doesn't parallelize sub scans (its using 
> SINGLETON for distribution type). Everything is ran in single fragment.
> We may have to use SubsetTransformer in UnionAllPrule.



--
This message was sent by Atlassian Jira
(v8.20.7#820007)


[jira] [Commented] (DRILL-1343) Drill should time out after short time if a storage plugin is unresponsive.

2022-06-16 Thread ASF GitHub Bot (Jira)


[ 
https://issues.apache.org/jira/browse/DRILL-1343?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17555185#comment-17555185
 ] 

ASF GitHub Bot commented on DRILL-1343:
---

hsuanyi closed pull request #167: DRILL-1343: Drill should timeout after short 
time if a storage plugin…
URL: https://github.com/apache/drill/pull/167




> Drill should time out after short time if a storage plugin is unresponsive.
> ---
>
> Key: DRILL-1343
> URL: https://issues.apache.org/jira/browse/DRILL-1343
> Project: Apache Drill
>  Issue Type: Bug
>  Components: Execution - Flow
>Reporter: Zhiyong Liu
>Assignee: Sean Hsuan-Yi Chu
>Priority: Minor
> Fix For: Future
>
> Attachments: DRILL-1343.1.patch, DRILL-1343.2.patch, 
> DRILL-1343.3.patch
>
>
> git.commit.id.abbrev=654c879
> git.commit.id=654c879f7caa13925edca911de1b59d04d8f1a8b
> Start drillbit and sqlline with a schema specified, e.g.,
> sqlline -n admin -p admin -u 
> "jdbc:drill:schema=dfs.TpcHMulti;zk=10.10.30.104:5181,10.10.30.105:5181,10.10.30.106:5181"
> Execute one of the following:
> show tables;
> select * from INFORMATION_SCHEMA.`TABLES`;
> The commands hang forever.  No exception was thrown in the log file.
> Note that if using zk=local, the second query works with no hanging problems.



--
This message was sent by Atlassian Jira
(v8.20.7#820007)


[jira] [Commented] (DRILL-2915) Regression: Mondrian query5614.q - Query failed: SYSTEM ERROR: This query cannot be planned possibly due to either a cartesian join or an inequality join

2022-06-16 Thread ASF GitHub Bot (Jira)


[ 
https://issues.apache.org/jira/browse/DRILL-2915?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17555184#comment-17555184
 ] 

ASF GitHub Bot commented on DRILL-2915:
---

hsuanyi closed pull request #271: DRILL-2915: After cartesian join is selected, 
Drill will apply the ne…
URL: https://github.com/apache/drill/pull/271




> Regression: Mondrian query5614.q - Query failed: SYSTEM ERROR: This query 
> cannot be planned possibly due to either a cartesian join or an inequality 
> join
> -
>
> Key: DRILL-2915
> URL: https://issues.apache.org/jira/browse/DRILL-2915
> Project: Apache Drill
>  Issue Type: Bug
>  Components: Query Planning & Optimization
>Affects Versions: 0.9.0
>Reporter: Chun Chang
>Assignee: Sean Hsuan-Yi Chu
>Priority: Critical
> Fix For: Future
>
> Attachments: mondrian_query5614.explain
>
>
> #Wed Apr 29 14:39:22 EDT 2015
> git.commit.id.abbrev=f5b0f49
> The following mondrian query fails now.
> {code}
> SELECT store.store_state   AS c0, 
>Count(DISTINCT sales_fact_1997.customer_id) AS m0 
> FROM   store AS store, 
>sales_fact_1997 AS sales_fact_1997, 
>time_by_day AS time_by_day, 
>product_class AS product_class, 
>product AS product 
> WHERE  sales_fact_1997.store_id = store.store_id 
>AND store.store_state = 'CA' 
>AND sales_fact_1997.time_id = time_by_day.time_id 
>AND sales_fact_1997.product_id = product.product_id 
>AND product.product_class_id = product_class.product_class_id 
>AND ( ( product_class.product_family = 'Food' 
>AND time_by_day.quarter = 'Q1' 
>AND time_by_day.the_year = 1997 ) 
>   OR ( product_class.product_family = 'Drink' 
>AND time_by_day.month_of_year = 4 
>AND time_by_day.quarter = 'Q2' 
>AND time_by_day.the_year = 1997 ) ) 
> GROUP  BY store.store_state; 
> {code}
> postgres:
> {code}
> foodmart=# select store.store_state as c0, count(distinct 
> sales_fact_1997.customer_id) as m0 from store as store, sales_fact_1997 as 
> sales_fact_1997, time_by_day as time_by_day, product_class as product_class, 
> product as product where sales_fact_1997.store_id = store.store_id and 
> store.store_state = 'CA' and sales_fact_1997.time_id = time_by_day.time_id 
> and sales_fact_1997.product_id = product.product_id and 
> product.product_class_id = product_class.product_class_id and 
> ((product_class.product_family = 'Food' and time_by_day.quarter = 'Q1' and 
> time_by_day.the_year = 1997) or (product_class.product_family = 'Drink' and 
> time_by_day.month_of_year = 4 and time_by_day.quarter = 'Q2' and 
> time_by_day.the_year = 1997)) group by store.store_state;
>  c0 |  m0
> +--
>  CA | 1175
> (1 row)
> {code}
> drill failed
> {code}
> 0: jdbc:drill:schema=dfs.drillTestDirAdvanced> select store.store_state as 
> c0, count(distinct sales_fact_1997.customer_id) as m0 from store as store, 
> sales_fact_1997 as sales_fact_1997, time_by_day as time_by_day, product_class 
> as product_class, product as product where sales_fact_1997.store_id = 
> store.store_id and store.store_state = 'CA' and sales_fact_1997.time_id = 
> time_by_day.time_id and sales_fact_1997.product_id = product.product_id and 
> product.product_class_id = product_class.product_class_id and 
> ((product_class.product_family = 'Food' and time_by_day.quarter = 'Q1' and 
> time_by_day.the_year = 1997) or (product_class.product_family = 'Drink' and 
> time_by_day.month_of_year = 4 and time_by_day.quarter = 'Q2' and 
> time_by_day.the_year = 1997)) group by store.store_state;
> Query failed: SYSTEM ERROR: This query cannot be planned possibly due to 
> either a cartesian join or an inequality join
> [3eb99963-92aa-4129-844f-fe43839537b9 on qa-node119.qa.lab:31010]
> Error: exception while executing query: Failure while executing query. 
> (state=,code=0)
> {code}



--
This message was sent by Atlassian Jira
(v8.20.7#820007)


[jira] [Updated] (DRILL-8249) NullPointerException is thrown when trying select from parquet file

2022-06-16 Thread Artem Trush (Jira)


 [ 
https://issues.apache.org/jira/browse/DRILL-8249?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Artem Trush updated DRILL-8249:
---
Description: 
After one of the recent fix - 
[DRILL-1282|https://github.com/apache/drill/pull/2338] drill started to throw 
npe. Issue is related to drill 1.20 and above.

Simple {{SELECT * FROM}}  from {{nation.dict.parquet}} file. Attached it.

Were investigated that the code 
[here|https://github.com/apache/drill/blob/master/exec/java-exec/src/main/java/org/apache/drill/exec/store/parquet/columnreaders/VarLenColumnBulkInput.java#L318L341]
 is not working as expected. Before DRILL-1282 these code lines were not used 
for reading this file (or I guess any file).  

  was:
After one of the recent fix - 
[DRILL-1282|[https://github.com/apache/drill/pull/2338]] drill started to throw 
npe. Issue is related to drill 1.20 and above.

Simple {{SELECT * FROM}}  from {{nation.dict.parquet}} file. Attached it.

Were investigated that the code 
[here|https://github.com/apache/drill/blob/master/exec/java-exec/src/main/java/org/apache/drill/exec/store/parquet/columnreaders/VarLenColumnBulkInput.java#L318L341]
 is not working as expected. Before DRILL-1282 these code lines were not used 
for reading this file (or I guess any file).  


> NullPointerException is thrown when trying select from parquet file
> ---
>
> Key: DRILL-8249
> URL: https://issues.apache.org/jira/browse/DRILL-8249
> Project: Apache Drill
>  Issue Type: Bug
>  Components: Storage - Parquet
>Affects Versions: 1.20.0, 1.20.1
>Reporter: Artem Trush
>Assignee: Artem Trush
>Priority: Major
> Fix For: 1.20.2
>
> Attachments: nation.dict.parquet
>
>
> After one of the recent fix - 
> [DRILL-1282|https://github.com/apache/drill/pull/2338] drill started to throw 
> npe. Issue is related to drill 1.20 and above.
> Simple {{SELECT * FROM}}  from {{nation.dict.parquet}} file. Attached it.
> Were investigated that the code 
> [here|https://github.com/apache/drill/blob/master/exec/java-exec/src/main/java/org/apache/drill/exec/store/parquet/columnreaders/VarLenColumnBulkInput.java#L318L341]
>  is not working as expected. Before DRILL-1282 these code lines were not used 
> for reading this file (or I guess any file).  



--
This message was sent by Atlassian Jira
(v8.20.7#820007)


[jira] [Created] (DRILL-8249) NullPointerException is thrown when trying select from parquet file

2022-06-16 Thread Artem Trush (Jira)
Artem Trush created DRILL-8249:
--

 Summary: NullPointerException is thrown when trying select from 
parquet file
 Key: DRILL-8249
 URL: https://issues.apache.org/jira/browse/DRILL-8249
 Project: Apache Drill
  Issue Type: Bug
  Components: Storage - Parquet
Affects Versions: 1.20.1, 1.20.0
Reporter: Artem Trush
Assignee: Artem Trush
 Fix For: 1.20.2
 Attachments: nation.dict.parquet

After one of the recent fix - 
[DRILL-1282|[https://github.com/apache/drill/pull/2338]] drill started to throw 
npe. Issue is related to drill 1.20 and above.

Simple {{SELECT * FROM}}  from {{nation.dict.parquet}} file. Attached it.

Were investigated that the code 
[here|https://github.com/apache/drill/blob/master/exec/java-exec/src/main/java/org/apache/drill/exec/store/parquet/columnreaders/VarLenColumnBulkInput.java#L318L341]
 is not working as expected. Before DRILL-1282 these code lines were not used 
for reading this file (or I guess any file).  



--
This message was sent by Atlassian Jira
(v8.20.7#820007)