[
https://issues.apache.org/jira/browse/CALCITE-1866?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16081524#comment-16081524
]
Kang Wang commented on CALCITE-1866:
------------------------------------
I execute this command: 'mvn clean test -Dcalcite.test.db=mysql'
then I get tons of ERROR log, finally, failed.
I am sure i install "calcite-test-dataset" in VirtualBox successfully.
Here is the tail of the result:
2017-07-10 18:58:24,146 [pool-1-thread-8] ERROR -
org.apache.calcite.runtime.CalciteContextException: From line 1, column 16 to
line 1, column 18: Non-query expression encountered in illegal context
2017-07-10 18:58:24,156 [pool-1-thread-6] ERROR -
org.apache.calcite.runtime.CalciteException: Query expression encountered in
illegal context
2017-07-10 18:58:24,157 [pool-1-thread-6] ERROR -
org.apache.calcite.runtime.CalciteContextException: At line 1, column 34: Query
expression encountered in illegal context
2017-07-10 18:58:24,163 [pool-1-thread-1] ERROR -
org.apache.calcite.runtime.CalciteException: Unknown character set
'unknown-charset'
2017-07-10 18:58:24,163 [pool-1-thread-1] ERROR -
org.apache.calcite.runtime.CalciteContextException: From line 1, column 8 to
line 1, column 25: Unknown character set 'unknown-charset'
2017-07-10 18:58:24,162 [pool-1-thread-3] ERROR -
org.apache.calcite.sql.validate.SqlValidatorException: Binary literal string
must contain only characters '0' - '9', 'A' - 'F'
2017-07-10 18:58:24,162 [pool-1-thread-3] ERROR -
org.apache.calcite.runtime.CalciteContextException: From line 2, column 1 to
line 2, column 6: Binary literal string must contain only characters '0' - '9',
'A' - 'F'
2017-07-10 18:58:24,189 [pool-1-thread-2] ERROR -
org.apache.calcite.sql.validate.SqlValidatorException: Binary literal string
must contain only characters '0' - '9', 'A' - 'F'
2017-07-10 18:58:24,189 [pool-1-thread-2] ERROR -
org.apache.calcite.runtime.CalciteContextException: From line 1, column 8 to
line 1, column 19: Binary literal string must contain only characters '0' -
'9', 'A' - 'F'
2017-07-10 18:58:24,190 [pool-1-thread-2] ERROR -
org.apache.calcite.sql.validate.SqlValidatorException: Binary literal string
must contain only characters '0' - '9', 'A' - 'F'
2017-07-10 18:58:24,190 [pool-1-thread-2] ERROR -
org.apache.calcite.runtime.CalciteContextException: From line 1, column 8 to
line 1, column 17: Binary literal string must contain only characters '0' -
'9', 'A' - 'F'
Tests run: 307, Failures: 0, Errors: 0, Skipped: 6, Time elapsed: 0.4 sec - in
org.apache.calcite.sql.parser.parserextensiontesting.ExtensionSqlParserTest
Running org.apache.calcite.sql.parser.SqlUnParserTest
Tests run: 304, Failures: 0, Errors: 0, Skipped: 6, Time elapsed: 0.637 sec -
in org.apache.calcite.sql.parser.SqlUnParserTest
Running org.apache.calcite.test.LatticeTest
2017-07-10 18:59:22,893 [pool-1-thread-2] ERROR -
org.apache.calcite.sql.validate.SqlValidatorException: Object 'NONEXISTENT' not
found
2017-07-10 18:59:22,893 [pool-1-thread-2] ERROR -
org.apache.calcite.runtime.CalciteContextException: From line 1, column 17 to
line 1, column 27: Object 'NONEXISTENT' not found
2017-07-10 18:59:22,906 [pool-1-thread-2] ERROR -
org.apache.calcite.sql.validate.SqlValidatorException: Object 'NONEXISTENT' not
found
2017-07-10 18:59:22,907 [pool-1-thread-2] ERROR -
org.apache.calcite.runtime.CalciteContextException: From line 1, column 17 to
line 1, column 27: Object 'NONEXISTENT' not found
Tests run: 35, Failures: 0, Errors: 4, Skipped: 2, Time elapsed: 20.909 sec <<<
FAILURE! - in org.apache.calcite.test.LatticeTest
testTwoLattices(org.apache.calcite.test.LatticeTest) Time elapsed: 10.291 sec
<<< ERROR!
java.lang.RuntimeException:
exception while preparing [select s."unit_sales", p."brand_name"
from "foodmart"."sales_fact_1997" as s
join "foodmart"."product" as p using ("product_id")
]
at
org.apache.calcite.test.LatticeTest.testTwoLattices(LatticeTest.java:628)
Caused by: java.lang.RuntimeException:
while executing SQL [SELECT COUNT(*) AS `C`
FROM (SELECT `t`.`product_class_id`
FROM (SELECT `product_class_id`, `product_id`
FROM `foodmart`.`product`) AS `t`
INNER JOIN (SELECT `product_id`
FROM `foodmart`.`sales_fact_1997`) AS `t0` ON `t`.`product_id` =
`t0`.`product_id`
GROUP BY `t`.`product_class_id`) AS `t1`]
at
org.apache.calcite.test.LatticeTest.testTwoLattices(LatticeTest.java:628)
Caused by: com.mysql.jdbc.exceptions.MySQLTimeoutException: Statement cancelled
due to timeout or client request
at
org.apache.calcite.test.LatticeTest.testTwoLattices(LatticeTest.java:628)
testTileAlgorithm2(org.apache.calcite.test.LatticeTest) Time elapsed: 10.168
sec <<< ERROR!
java.lang.RuntimeException:
exception while executing [explain plan for select distinct t."the_year",
t."quarter"
from "foodmart"."sales_fact_1997" as s
join "foodmart"."time_by_day" as t using ("time_id")
]
at
org.apache.calcite.test.LatticeTest.checkTileAlgorithm(LatticeTest.java:422)
at
org.apache.calcite.test.LatticeTest.testTileAlgorithm2(LatticeTest.java:388)
Caused by: java.lang.RuntimeException:
while executing SQL [SELECT COUNT(*) AS `C`
FROM (SELECT `t`.`product_class_id`
FROM (SELECT `product_class_id`, `product_id`
FROM `foodmart`.`product`) AS `t`
INNER JOIN (SELECT `product_id`
FROM `foodmart`.`sales_fact_1997`) AS `t0` ON `t`.`product_id` =
`t0`.`product_id`
GROUP BY `t`.`product_class_id`) AS `t1`]
at
org.apache.calcite.test.LatticeTest.checkTileAlgorithm(LatticeTest.java:422)
at
org.apache.calcite.test.LatticeTest.testTileAlgorithm2(LatticeTest.java:388)
Caused by: com.mysql.jdbc.exceptions.MySQLTimeoutException: Statement cancelled
due to timeout or client request
at
org.apache.calcite.test.LatticeTest.checkTileAlgorithm(LatticeTest.java:422)
at
org.apache.calcite.test.LatticeTest.testTileAlgorithm2(LatticeTest.java:388)
testTileAlgorithm(org.apache.calcite.test.LatticeTest) Time elapsed: 13.375
sec <<< ERROR!
java.lang.RuntimeException:
exception while executing [explain plan for select distinct t."the_year",
t."quarter"
from "foodmart"."sales_fact_1997" as s
join "foodmart"."time_by_day" as t using ("time_id")
]
at
org.apache.calcite.test.LatticeTest.checkTileAlgorithm(LatticeTest.java:422)
at
org.apache.calcite.test.LatticeTest.testTileAlgorithm(LatticeTest.java:380)
Caused by: java.lang.RuntimeException: While populating materialization [adhoc,
m{7, 16, 25, 27, 31, 37}]
at
org.apache.calcite.test.LatticeTest.checkTileAlgorithm(LatticeTest.java:422)
at
org.apache.calcite.test.LatticeTest.testTileAlgorithm(LatticeTest.java:380)
Caused by: java.lang.RuntimeException:
while executing SQL [SELECT `t`.`unit_sales`, `t0`.`recyclable_package`,
`t1`.`the_day`, `t1`.`the_year`, `t1`.`quarter`, `t2`.`product_family`,
COUNT(*) AS `m0`, SUM(`t`.`store_sales`) AS `m1`, SUM(`t`.`unit_sales`) AS `m2`
FROM (SELECT `product_id`, `time_id`, `store_sales`, `unit_sales`
FROM `foodmart`.`sales_fact_1997`) AS `t`
INNER JOIN (SELECT `product_class_id`, `product_id`, `recyclable_package`
FROM `foodmart`.`product`) AS `t0` ON `t`.`product_id` = `t0`.`product_id`
INNER JOIN (SELECT `time_id`, `the_day`, `the_year`, `quarter`
FROM `foodmart`.`time_by_day`) AS `t1` ON `t`.`time_id` = `t1`.`time_id`
INNER JOIN (SELECT `product_class_id`, `product_family`
FROM `foodmart`.`product_class`) AS `t2` ON `t0`.`product_class_id` =
`t2`.`product_class_id`
GROUP BY `t`.`unit_sales`, `t0`.`recyclable_package`, `t1`.`the_day`,
`t1`.`the_year`, `t1`.`quarter`, `t2`.`product_family`]
at
org.apache.calcite.test.LatticeTest.checkTileAlgorithm(LatticeTest.java:422)
at
org.apache.calcite.test.LatticeTest.testTileAlgorithm(LatticeTest.java:380)
Caused by: com.mysql.jdbc.exceptions.MySQLTimeoutException: Statement cancelled
due to timeout or client request
at
org.apache.calcite.test.LatticeTest.checkTileAlgorithm(LatticeTest.java:422)
at
org.apache.calcite.test.LatticeTest.testTileAlgorithm(LatticeTest.java:380)
testLatticeRecognizeGroupJoin(org.apache.calcite.test.LatticeTest) Time
elapsed: 10.112 sec <<< ERROR!
java.lang.RuntimeException:
exception while preparing [select distinct p."brand_name", s."customer_id"
from "foodmart"."sales_fact_1997" as s
join "foodmart"."product" as p using ("product_id")
]
at
org.apache.calcite.test.LatticeTest.testLatticeRecognizeGroupJoin(LatticeTest.java:271)
Caused by: java.lang.RuntimeException: With materializationsEnabled=true
at
org.apache.calcite.test.LatticeTest.testLatticeRecognizeGroupJoin(LatticeTest.java:271)
Caused by: java.sql.SQLException:
Error while preparing statement [select distinct p."brand_name", s."customer_id"
from "foodmart"."sales_fact_1997" as s
join "foodmart"."product" as p using ("product_id")
]
at
org.apache.calcite.test.LatticeTest.testLatticeRecognizeGroupJoin(LatticeTest.java:271)
Caused by: java.lang.RuntimeException: Error while applying rule
AggregateStarTableRule, args
[rel#647381:LogicalAggregate.NONE.[](input=rel#647379:Subset#7.NONE.[],group={2,
10}), rel#647442:StarTableScan.NONE.[](table=[adhoc, star])]
at
org.apache.calcite.test.LatticeTest.testLatticeRecognizeGroupJoin(LatticeTest.java:271)
Caused by: java.lang.RuntimeException:
while executing SQL [SELECT `t`.`customer_id`, `t0`.`brand_name`
FROM (SELECT `product_id`, `customer_id`
FROM `foodmart`.`sales_fact_1997`) AS `t`
INNER JOIN (SELECT `product_id`, `brand_name`
FROM `foodmart`.`product`) AS `t0` ON `t`.`product_id` = `t0`.`product_id`
GROUP BY `t`.`customer_id`, `t0`.`brand_name`]
at
org.apache.calcite.test.LatticeTest.testLatticeRecognizeGroupJoin(LatticeTest.java:271)
Caused by: com.mysql.jdbc.exceptions.MySQLTimeoutException: Statement cancelled
due to timeout or client request
at
org.apache.calcite.test.LatticeTest.testLatticeRecognizeGroupJoin(LatticeTest.java:271)
Results :
Tests in error:
LatticeTest.testLatticeRecognizeGroupJoin:271 » Runtime exception while
prepar...
LatticeTest.testTileAlgorithm:380->checkTileAlgorithm:422 » Runtime exception
...
LatticeTest.testTileAlgorithm2:388->checkTileAlgorithm:422 » Runtime
exception...
LatticeTest.testTwoLattices:628 » Runtime exception while preparing [select
s....
Tests run: 4054, Failures: 0, Errors: 4, Skipped: 109
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 02:29 min
[INFO] Finished at: 2017-07-10T19:00:21+08:00
[INFO] Final Memory: 63M/1562M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal
org.apache.maven.plugins:maven-surefire-plugin:2.19.1:test (default-test) on
project calcite-core: There are test failures.
[ERROR]
[ERROR] Please refer to
/Users/Shared/Github/calcite/core/target/surefire-reports for the individual
test results.
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e
switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please
read the following articles:
[ERROR] [Help 1]
http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
> dateTime FLOOR to HOUR cause MySQL connector throw SQLException
> ---------------------------------------------------------------
>
> Key: CALCITE-1866
> URL: https://issues.apache.org/jira/browse/CALCITE-1866
> Project: Calcite
> Issue Type: Bug
> Components: core
> Affects Versions: 1.14.0
> Environment: MySQL 5.6.34
> mysql-connector-java.jar:5.1.39
> Calcite 1.14.0-SNAPSHOT
> Reporter: Kang Wang
> Assignee: Julian Hyde
> Priority: Minor
> Labels: easyfix
> Fix For: 1.14.0
>
> Original Estimate: 1h
> Remaining Estimate: 1h
>
> I execute the sql "select FLOOR(trade_time TO HOUR) ..."
> then I get the ResultSet, if time hour is less than 10, I get the following
> exception:
> ------
> java.lang.RuntimeException: java.sql.SQLException: Bad format for Timestamp
> '2017-06-30 7:00:00' in column 1.
> at Baz$1$1.apply(Unknown Source)
> at
> org.apache.calcite.runtime.ResultSetEnumerable$ResultSetEnumerator.current(ResultSetEnumerable.java:187)
> at
> org.apache.calcite.linq4j.Linq4j$EnumeratorIterator.next(Linq4j.java:672)
> at
> org.apache.calcite.avatica.util.IteratorCursor.next(IteratorCursor.java:46)
> at
> org.apache.calcite.avatica.AvaticaResultSet.next(AvaticaResultSet.java:239)
> at TestCalcite.test028_jdbc(TestCalcite.java:75)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:606)
> at
> org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
> at
> org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
> at
> org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
> at
> org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
> at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
> at
> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
> at
> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
> at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
> at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
> at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
> at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
> at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
> at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
> at org.junit.runners.Suite.runChild(Suite.java:128)
> at org.junit.runners.Suite.runChild(Suite.java:27)
> at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
> at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
> at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
> at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
> at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
> at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
> at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
> at
> com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:68)
> at
> com.intellij.rt.execution.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:51)
> at
> com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:242)
> at
> com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:70)
> Caused by: java.sql.SQLException: Bad format for Timestamp '2017-06-30
> 7:00:00' in column 1.
> at com.mysql.jdbc.ResultSetRow.getTimestampFast(ResultSetRow.java:1157)
> at com.mysql.jdbc.ByteArrayRow.getTimestampFast(ByteArrayRow.java:130)
> at
> com.mysql.jdbc.ResultSetImpl.getTimestampInternal(ResultSetImpl.java:5946)
> at com.mysql.jdbc.ResultSetImpl.getTimestamp(ResultSetImpl.java:5616)
> at
> org.apache.commons.dbcp.DelegatingResultSet.getTimestamp(DelegatingResultSet.java:250)
> at
> org.apache.commons.dbcp.DelegatingResultSet.getTimestamp(DelegatingResultSet.java:250)
> ... 36 more
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)