You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@drill.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2016/06/15 18:36:09 UTC

[jira] [Commented] (DRILL-4724) convert_from(binary_string(expression),'INT_BE') results in Exception

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

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

GitHub user vkorukanti opened a pull request:

    https://github.com/apache/drill/pull/524

    DRILL-4724: Improvements to InfoSchema RecordGenerator needed for DRILL-4714

    1. Add support for pushing the filter on following fields into InfoSchemaRecordGenerator:
       - CATALOG_NAME
       - COLUMN_NAME
    
    2. Pushdown LIKE with ESCAPE. Add test TestInfoSchemaFilterPushDown#testFilterPushdown_LikeWithEscape
    
    3. Add a method visitCatalog() to InfoSchemaRecordGenerator to decide whether to explore the catalog or not
    
    4. Refactor CATALOG_DESCRIPTION and CATALOG_CONNECT as constant strings in InfoSchemaConstants.java
    
    5. Update TestInfoSchemaFilterPushDown#testPartialFilterPushDownWithProject as
       we are now pushing the filter on COLUMN_NAME field
    
    6. Cleanup:
       Rename RecordGenerator -> InfoSchemaRecordGenerator
       Add comments in RecordGenerator
       Rename SelectedTable -> InfoSchemaTableType
    
    @parthchandra Can you please review this change?

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/vkorukanti/drill DRILL-4725

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/drill/pull/524.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #524
    
----
commit f331507af044d42b74b1fedbf7b9de8adc861334
Author: vkorukanti <ve...@dremio.com>
Date:   2016-06-09T07:00:31Z

    DRILL-4724: Improvements to InfoSchema RecordGenerator needed for DRILL-4714
    
    1. Add support for pushing the filter on following fields into InfoSchemaRecordGenerator:
       - CATALOG_NAME
       - COLUMN_NAME
    
    2. Pushdown LIKE with ESCAPE. Add test TestInfoSchemaFilterPushDown#testFilterPushdown_LikeWithEscape
    
    3. Add a method visitCatalog() to InfoSchemaRecordGenerator to decide whether to explore the catalog or not
    
    4. Refactor CATALOG_DESCRIPTION and CATALOG_CONNECT as constant strings in InfoSchemaConstants.java
    
    5. Update TestInfoSchemaFilterPushDown#testPartialFilterPushDownWithProject as
       we are now pushing the filter on COLUMN_NAME field
    
    6. Cleanup:
       Rename RecordGenerator -> InfoSchemaRecordGenerator
       Add comments in RecordGenerator
       Rename SelectedTable -> InfoSchemaTableType
    
    Change-Id: I0b2e16d04cb72fe3ce5961f5f357a00655f1cb05

----


> convert_from(binary_string(expression),'INT_BE') results in Exception
> ---------------------------------------------------------------------
>
>                 Key: DRILL-4724
>                 URL: https://issues.apache.org/jira/browse/DRILL-4724
>             Project: Apache Drill
>          Issue Type: Bug
>          Components: Execution - Data Types
>    Affects Versions: 1.7.0
>            Reporter: Khurram Faraaz
>            Assignee: Chunhui Shi
>
> The below query that uses binary_string function results in Exception
> Drill git commit ID : 6286c0a4
> {noformat}
> 2016-06-15 09:20:43,623 [289ee213-8ada-808f-e59d-5a6b67c53732:foreman] INFO  o.a.drill.exec.work.foreman.Foreman - Query text for query id 289ee213-8ada-808f-e59d-5a6b67c53732: values(convert_from(binary_string('\\x99\\x8c\\x2f\\x77'),'INT_BE'))
> 2016-06-15 09:20:43,666 [289ee213-8ada-808f-e59d-5a6b67c53732:foreman] ERROR o.a.drill.exec.work.foreman.Foreman - SYSTEM ERROR: IllegalArgumentException: Wrong length 8(8-0) in the buffer '\x5C\x99\x5C\x8C\x5C/\x5Cw', expected 4.
> [Error Id: bb6968cd-44c2-4c48-bb12-865f8709167e on centos-01.qa.lab:31010]
> org.apache.drill.common.exceptions.UserException: SYSTEM ERROR: IllegalArgumentException: Wrong length 8(8-0) in the buffer '\x5C\x99\x5C\x8C\x5C/\x5Cw', expected 4.
> [Error Id: bb6968cd-44c2-4c48-bb12-865f8709167e on centos-01.qa.lab:31010]
>         at org.apache.drill.common.exceptions.UserException$Builder.build(UserException.java:543) ~[drill-common-1.7.0-SNAPSHOT.jar:1.7.0-SNAPSHOT]
>         at org.apache.drill.exec.work.foreman.Foreman$ForemanResult.close(Foreman.java:791) [drill-java-exec-1.7.0-SNAPSHOT.jar:1.7.0-SNAPSHOT]
>         at org.apache.drill.exec.work.foreman.Foreman.moveToState(Foreman.java:901) [drill-java-exec-1.7.0-SNAPSHOT.jar:1.7.0-SNAPSHOT]
>         at org.apache.drill.exec.work.foreman.Foreman.run(Foreman.java:271) [drill-java-exec-1.7.0-SNAPSHOT.jar:1.7.0-SNAPSHOT]
>         at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [na:1.7.0_101]
>         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [na:1.7.0_101]
>         at java.lang.Thread.run(Thread.java:745) [na:1.7.0_101]
> Caused by: org.apache.drill.exec.work.foreman.ForemanException: Unexpected exception during fragment initialization: Internal error: Error while applying rule ReduceExpressionsRule_Project, args [rel#1460:LogicalProject.NONE.ANY([]).[](input=rel#1459:Subset#0.NONE.ANY([]).[0],EXPR$0=CONVERT_FROMINT_BE(BINARY_STRING('\\x99\\x8c\\x2f\\x77')))]
>         ... 4 common frames omitted
> Caused by: java.lang.AssertionError: Internal error: Error while applying rule ReduceExpressionsRule_Project, args [rel#1460:LogicalProject.NONE.ANY([]).[](input=rel#1459:Subset#0.NONE.ANY([]).[0],EXPR$0=CONVERT_FROMINT_BE(BINARY_STRING('\\x99\\x8c\\x2f\\x77')))]
>         at org.apache.calcite.util.Util.newInternal(Util.java:792) ~[calcite-core-1.4.0-drill-r11.jar:1.4.0-drill-r11]
>         at org.apache.calcite.plan.volcano.VolcanoRuleCall.onMatch(VolcanoRuleCall.java:251) ~[calcite-core-1.4.0-drill-r11.jar:1.4.0-drill-r11]
>         at org.apache.calcite.plan.volcano.VolcanoPlanner.findBestExp(VolcanoPlanner.java:808) ~[calcite-core-1.4.0-drill-r11.jar:1.4.0-drill-r11]
>         at org.apache.calcite.tools.Programs$RuleSetProgram.run(Programs.java:303) ~[calcite-core-1.4.0-drill-r11.jar:1.4.0-drill-r11]
>         at org.apache.drill.exec.planner.sql.handlers.DefaultSqlHandler.transform(DefaultSqlHandler.java:400) ~[drill-java-exec-1.7.0-SNAPSHOT.jar:1.7.0-SNAPSHOT]
>         at org.apache.drill.exec.planner.sql.handlers.DefaultSqlHandler.transform(DefaultSqlHandler.java:339) ~[drill-java-exec-1.7.0-SNAPSHOT.jar:1.7.0-SNAPSHOT]
>         at org.apache.drill.exec.planner.sql.handlers.DefaultSqlHandler.convertToDrel(DefaultSqlHandler.java:237) ~[drill-java-exec-1.7.0-SNAPSHOT.jar:1.7.0-SNAPSHOT]
>         at org.apache.drill.exec.planner.sql.handlers.DefaultSqlHandler.convertToDrel(DefaultSqlHandler.java:286) ~[drill-java-exec-1.7.0-SNAPSHOT.jar:1.7.0-SNAPSHOT]
>         at org.apache.drill.exec.planner.sql.handlers.DefaultSqlHandler.getPlan(DefaultSqlHandler.java:168) ~[drill-java-exec-1.7.0-SNAPSHOT.jar:1.7.0-SNAPSHOT]
>         at org.apache.drill.exec.planner.sql.DrillSqlWorker.getPlan(DrillSqlWorker.java:94) ~[drill-java-exec-1.7.0-SNAPSHOT.jar:1.7.0-SNAPSHOT]
>         at org.apache.drill.exec.work.foreman.Foreman.runSQL(Foreman.java:978) [drill-java-exec-1.7.0-SNAPSHOT.jar:1.7.0-SNAPSHOT]
>         at org.apache.drill.exec.work.foreman.Foreman.run(Foreman.java:257) [drill-java-exec-1.7.0-SNAPSHOT.jar:1.7.0-SNAPSHOT]
>         ... 3 common frames omitted
> Caused by: java.lang.RuntimeException: Error in evaluating function of convert_fromint_be
>         at org.apache.drill.exec.expr.fn.interpreter.InterpreterEvaluator$EvalVisitor.visitFunctionHolderExpression(InterpreterEvaluator.java:323) ~[drill-java-exec-1.7.0-SNAPSHOT.jar:1.7.0-SNAPSHOT]
>         at org.apache.drill.exec.expr.fn.interpreter.InterpreterEvaluator$EvalVisitor.visitFunctionHolderExpression(InterpreterEvaluator.java:147) ~[drill-java-exec-1.7.0-SNAPSHOT.jar:1.7.0-SNAPSHOT]
>         at org.apache.drill.common.expression.FunctionHolderExpression.accept(FunctionHolderExpression.java:47) ~[drill-logical-1.7.0-SNAPSHOT.jar:1.7.0-SNAPSHOT]
>         at org.apache.drill.exec.expr.fn.interpreter.InterpreterEvaluator.evaluateConstantExpr(InterpreterEvaluator.java:65) ~[drill-java-exec-1.7.0-SNAPSHOT.jar:1.7.0-SNAPSHOT]
>         at org.apache.drill.exec.planner.logical.DrillConstExecutor.reduce(DrillConstExecutor.java:131) ~[drill-java-exec-1.7.0-SNAPSHOT.jar:1.7.0-SNAPSHOT]
>         at org.apache.calcite.rel.rules.ReduceExpressionsRule.reduceExpressions(ReduceExpressionsRule.java:499) ~[calcite-core-1.4.0-drill-r11.jar:1.4.0-drill-r11]
>         at org.apache.calcite.rel.rules.ReduceExpressionsRule$1.onMatch(ReduceExpressionsRule.java:241) ~[calcite-core-1.4.0-drill-r11.jar:1.4.0-drill-r11]
>         at org.apache.calcite.plan.volcano.VolcanoRuleCall.onMatch(VolcanoRuleCall.java:228) ~[calcite-core-1.4.0-drill-r11.jar:1.4.0-drill-r11]
>         ... 13 common frames omitted
> Caused by: java.lang.IllegalArgumentException: Wrong length 8(8-0) in the buffer '\x5C\x99\x5C\x8C\x5C/\x5Cw', expected 4.
>         at org.apache.drill.exec.util.ByteBufUtil.checkBufferLength(ByteBufUtil.java:35) ~[drill-java-exec-1.7.0-SNAPSHOT.jar:1.7.0-SNAPSHOT]
>         at org.apache.drill.exec.expr.fn.impl.conv.IntBEConvertFrom.eval(IntBEConvertFrom.java:40) ~[drill-java-exec-1.7.0-SNAPSHOT.jar:1.7.0-SNAPSHOT]
>         at org.apache.drill.exec.expr.fn.interpreter.InterpreterEvaluator$EvalVisitor.visitFunctionHolderExpression(InterpreterEvaluator.java:309) ~[drill-java-exec-1.7.0-SNAPSHOT.jar:1.7.0-SNAPSHOT]
>         ... 20 common frames omitted
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)