You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/**
* If you want to execute in the IDE, adjust the scope of the spark package in the parent pom to compile.
* 如果希望在IDE中执行spark和flink的样例代码,请调整父pom中的spark、flink的scope值为compile。
* @param args nothing
*/
public static void main(String[] args) throws IOException {
RuntimeEnv.init();
String sql = "select * from depts";
SqlRunner.Builder.RunnerType runnerType = RunnerType.value(args.length < 1 ? "flink" : args[0]);
SqlRunner runner = SqlRunner.builder()
.setTransformRunner(runnerType)
.setSchemaPath(RuntimeEnv.metadata)
.setAppName("test_csv_app")
.setAcceptedResultsNum(100)
.ok();
runner.sql(sql).show();
System.exit(0);
}
}`
Output: Elasticsearch Embedded Server has started!! Your query is running... Exception in thread "main" java.lang.RuntimeException: org.apache.flink.table.api.ValidationException: SQL validation failed. From line 1, column 26 to line 1, column 44: Object 'custom_name_depts_0' not found at com.qihoo.qsql.exec.flink.FlinkPipeline.show(FlinkPipeline.java:62) at com.qihoo.qsql.CsvScanExample.main(CsvScanExample.java:25) Caused by: org.apache.flink.table.api.ValidationException: SQL validation failed. From line 1, column 26 to line 1, column 44: Object 'custom_name_depts_0' not found at org.apache.flink.table.calcite.FlinkPlannerImpl.validate(FlinkPlannerImpl.scala:128) at org.apache.flink.table.api.internal.TableEnvImpl.sqlQuery(TableEnvImpl.scala:431) at Requirement36311.execute(Requirement36311.java:25) at com.qihoo.qsql.exec.flink.FlinkPipeline.show(FlinkPipeline.java:60) ... 1 more Caused by: org.apache.calcite.runtime.CalciteContextException: From line 1, column 26 to line 1, column 44: Object 'custom_name_depts_0' not found at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:423) at org.apache.calcite.runtime.Resources$ExInstWithCause.ex(Resources.java:463) at org.apache.calcite.sql.SqlUtil.newContextException(SqlUtil.java:824) at org.apache.calcite.sql.SqlUtil.newContextException(SqlUtil.java:809) at org.apache.calcite.sql.validate.SqlValidatorImpl.newValidationError(SqlValidatorImpl.java:4807) at org.apache.calcite.sql.validate.IdentifierNamespace.resolveImpl(IdentifierNamespace.java:172) at org.apache.calcite.sql.validate.IdentifierNamespace.validateImpl(IdentifierNamespace.java:177) at org.apache.calcite.sql.validate.AbstractNamespace.validate(AbstractNamespace.java:84) at org.apache.calcite.sql.validate.SqlValidatorImpl.validateNamespace(SqlValidatorImpl.java:997) at org.apache.calcite.sql.validate.SqlValidatorImpl.validateQuery(SqlValidatorImpl.java:957) at org.apache.calcite.sql.validate.SqlValidatorImpl.validateFrom(SqlValidatorImpl.java:3111) at org.apache.calcite.sql.validate.SqlValidatorImpl.validateFrom(SqlValidatorImpl.java:3093) at org.apache.calcite.sql.validate.SqlValidatorImpl.validateSelect(SqlValidatorImpl.java:3365) at org.apache.calcite.sql.validate.SelectNamespace.validateImpl(SelectNamespace.java:60) at org.apache.calcite.sql.validate.AbstractNamespace.validate(AbstractNamespace.java:84) at org.apache.calcite.sql.validate.SqlValidatorImpl.validateNamespace(SqlValidatorImpl.java:997) at org.apache.calcite.sql.validate.SqlValidatorImpl.validateQuery(SqlValidatorImpl.java:957) at org.apache.calcite.sql.SqlSelect.validate(SqlSelect.java:216) at org.apache.calcite.sql.validate.SqlValidatorImpl.validateScopedExpression(SqlValidatorImpl.java:932) at org.apache.calcite.sql.validate.SqlValidatorImpl.validate(SqlValidatorImpl.java:639) at org.apache.flink.table.calcite.FlinkPlannerImpl.validate(FlinkPlannerImpl.scala:124) ... 4 more Caused by: org.apache.calcite.sql.validate.SqlValidatorException: Object 'custom_name_depts_0' not found at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:423) at org.apache.calcite.runtime.Resources$ExInstWithCause.ex(Resources.java:463) at org.apache.calcite.runtime.Resources$ExInst.ex(Resources.java:572) ... 23 more
To Reproduce
Steps to reproduce the behavior:
Go to '...'
Click on '....'
Scroll down to '....'
See error
Expected behavior
A clear and concise description of what you expected to happen.
Actual behavior
If applicable, add screenshots to help explain your problem.
But do not paste log screenshots here.
Full Output Logs
Please paste your log here.
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered:
Versions
0.7.0
Describe the bug
CsvScanExample.java:
`package com.qihoo.qsql;
import com.qihoo.qsql.api.SqlRunner;
import com.qihoo.qsql.api.SqlRunner.Builder.RunnerType;
import com.qihoo.qsql.env.RuntimeEnv;
import java.io.IOException;
public class CsvScanExample {
}`
Output:
Elasticsearch Embedded Server has started!! Your query is running... Exception in thread "main" java.lang.RuntimeException: org.apache.flink.table.api.ValidationException: SQL validation failed. From line 1, column 26 to line 1, column 44: Object 'custom_name_depts_0' not found at com.qihoo.qsql.exec.flink.FlinkPipeline.show(FlinkPipeline.java:62) at com.qihoo.qsql.CsvScanExample.main(CsvScanExample.java:25) Caused by: org.apache.flink.table.api.ValidationException: SQL validation failed. From line 1, column 26 to line 1, column 44: Object 'custom_name_depts_0' not found at org.apache.flink.table.calcite.FlinkPlannerImpl.validate(FlinkPlannerImpl.scala:128) at org.apache.flink.table.api.internal.TableEnvImpl.sqlQuery(TableEnvImpl.scala:431) at Requirement36311.execute(Requirement36311.java:25) at com.qihoo.qsql.exec.flink.FlinkPipeline.show(FlinkPipeline.java:60) ... 1 more Caused by: org.apache.calcite.runtime.CalciteContextException: From line 1, column 26 to line 1, column 44: Object 'custom_name_depts_0' not found at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:423) at org.apache.calcite.runtime.Resources$ExInstWithCause.ex(Resources.java:463) at org.apache.calcite.sql.SqlUtil.newContextException(SqlUtil.java:824) at org.apache.calcite.sql.SqlUtil.newContextException(SqlUtil.java:809) at org.apache.calcite.sql.validate.SqlValidatorImpl.newValidationError(SqlValidatorImpl.java:4807) at org.apache.calcite.sql.validate.IdentifierNamespace.resolveImpl(IdentifierNamespace.java:172) at org.apache.calcite.sql.validate.IdentifierNamespace.validateImpl(IdentifierNamespace.java:177) at org.apache.calcite.sql.validate.AbstractNamespace.validate(AbstractNamespace.java:84) at org.apache.calcite.sql.validate.SqlValidatorImpl.validateNamespace(SqlValidatorImpl.java:997) at org.apache.calcite.sql.validate.SqlValidatorImpl.validateQuery(SqlValidatorImpl.java:957) at org.apache.calcite.sql.validate.SqlValidatorImpl.validateFrom(SqlValidatorImpl.java:3111) at org.apache.calcite.sql.validate.SqlValidatorImpl.validateFrom(SqlValidatorImpl.java:3093) at org.apache.calcite.sql.validate.SqlValidatorImpl.validateSelect(SqlValidatorImpl.java:3365) at org.apache.calcite.sql.validate.SelectNamespace.validateImpl(SelectNamespace.java:60) at org.apache.calcite.sql.validate.AbstractNamespace.validate(AbstractNamespace.java:84) at org.apache.calcite.sql.validate.SqlValidatorImpl.validateNamespace(SqlValidatorImpl.java:997) at org.apache.calcite.sql.validate.SqlValidatorImpl.validateQuery(SqlValidatorImpl.java:957) at org.apache.calcite.sql.SqlSelect.validate(SqlSelect.java:216) at org.apache.calcite.sql.validate.SqlValidatorImpl.validateScopedExpression(SqlValidatorImpl.java:932) at org.apache.calcite.sql.validate.SqlValidatorImpl.validate(SqlValidatorImpl.java:639) at org.apache.flink.table.calcite.FlinkPlannerImpl.validate(FlinkPlannerImpl.scala:124) ... 4 more Caused by: org.apache.calcite.sql.validate.SqlValidatorException: Object 'custom_name_depts_0' not found at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:423) at org.apache.calcite.runtime.Resources$ExInstWithCause.ex(Resources.java:463) at org.apache.calcite.runtime.Resources$ExInst.ex(Resources.java:572) ... 23 more
To Reproduce
Steps to reproduce the behavior:
Expected behavior
A clear and concise description of what you expected to happen.
Actual behavior
If applicable, add screenshots to help explain your problem.
But do not paste log screenshots here.
Full Output Logs
Please paste your log here.
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: