Skip to content

Commit c822828

Browse files
committed
Fixed JDBC Test Error
1 parent 031d5a8 commit c822828

2 files changed

Lines changed: 17 additions & 19 deletions

File tree

contrib/storage-jdbc/src/test/java/org/apache/drill/exec/store/jdbc/TestJdbcPluginWithMySQLIT.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -299,14 +299,14 @@ public void testExpressionsWithoutAliasesPermutations() throws Exception {
299299
@Test // DRILL-6734
300300
public void testExpressionsWithAliases() throws Exception {
301301
String query = "select person_id as ID, 1+1+2+3+5+8+13+21+34 as FIBONACCI_SUM, (1+sqrt(5))/2 as golden_ratio\n" +
302-
"from mysql.`drill_mysql_test`.person limit 2";
302+
"from mysql.`drill_mysql_test`.person order by person_id limit 2";
303303

304304
testBuilder()
305305
.sqlQuery(query)
306-
.unOrdered()
306+
.ordered()
307307
.baselineColumns("ID", "FIBONACCI_SUM", "golden_ratio")
308-
.baselineValues(1, 88, BigDecimal.valueOf(1.618033988749895))
309-
.baselineValues(2, 88, BigDecimal.valueOf(1.618033988749895))
308+
.baselineValues(1, 88, 1.618033988749895)
309+
.baselineValues(2, 88, 1.618033988749895)
310310
.go();
311311
}
312312

exec/java-exec/src/main/java/org/apache/drill/exec/planner/sql/parser/UnsupportedOperatorsVisitor.java

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -17,34 +17,32 @@
1717
*/
1818
package org.apache.drill.exec.planner.sql.parser;
1919

20+
import com.google.common.collect.Lists;
21+
import org.apache.calcite.sql.SqlAggFunction;
22+
import org.apache.calcite.sql.SqlCall;
23+
import org.apache.calcite.sql.SqlDataTypeSpec;
24+
import org.apache.calcite.sql.SqlIdentifier;
25+
import org.apache.calcite.sql.SqlJoin;
26+
import org.apache.calcite.sql.SqlKind;
27+
import org.apache.calcite.sql.SqlNode;
2028
import org.apache.calcite.sql.SqlNumericLiteral;
2129
import org.apache.calcite.sql.SqlOperator;
30+
import org.apache.calcite.sql.SqlSelect;
31+
import org.apache.calcite.sql.SqlSelectKeyword;
32+
import org.apache.calcite.sql.SqlWindow;
2233
import org.apache.calcite.sql.fun.SqlStdOperatorTable;
34+
import org.apache.calcite.sql.type.SqlTypeName;
2335
import org.apache.calcite.sql.util.SqlBasicVisitor;
36+
import org.apache.calcite.sql.util.SqlShuttle;
2437
import org.apache.calcite.util.Litmus;
2538
import org.apache.drill.exec.ExecConstants;
2639
import org.apache.drill.exec.exception.UnsupportedOperatorCollector;
2740
import org.apache.drill.exec.ops.QueryContext;
2841
import org.apache.drill.exec.planner.physical.PlannerSettings;
2942
import org.apache.drill.exec.work.foreman.SqlUnsupportedException;
3043

31-
import org.apache.calcite.sql.SqlSelectKeyword;
32-
import org.apache.calcite.sql.SqlIdentifier;
33-
import org.apache.calcite.sql.SqlSelect;
34-
import org.apache.calcite.sql.SqlWindow;
35-
import org.apache.calcite.sql.SqlAggFunction;
36-
import org.apache.calcite.sql.SqlCall;
37-
import org.apache.calcite.sql.SqlKind;
38-
import org.apache.calcite.sql.SqlJoin;
39-
import org.apache.calcite.sql.SqlNode;
40-
import org.apache.calcite.sql.type.SqlTypeName;
41-
import org.apache.calcite.sql.util.SqlShuttle;
42-
import org.apache.calcite.sql.SqlDataTypeSpec;
43-
4444
import java.util.List;
4545

46-
import com.google.common.collect.Lists;
47-
4846
public class UnsupportedOperatorsVisitor extends SqlShuttle {
4947
private QueryContext context;
5048
private static List<String> disabledType = Lists.newArrayList();

0 commit comments

Comments
 (0)