Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE] Update Error details from flint result index to end user. #2214

Closed
vmmusings opened this issue Oct 4, 2023 · 1 comment
Closed
Labels
enhancement New feature or request Flint v2.11.0 Issues targeting release v2.11.0

Comments

@vmmusings
Copy link
Member

Currently we don't read result index for error details.

@vmmusings vmmusings added enhancement New feature or request untriaged Flint and removed untriaged labels Oct 4, 2023
@vmmusings vmmusings added v2.11.0 Issues targeting release v2.11.0 and removed untriaged labels Oct 4, 2023
@vmmusings vmmusings assigned vmmusings and unassigned vmmusings Oct 4, 2023
@penghuo
Copy link
Collaborator

penghuo commented Oct 5, 2023

Issues

  • client submit query
drop create skipping index on mys3.default.http_logs
  • in result index
{
  "status": "FAILED",
  "error": "Fail to verify existing mapping or write result"
}
  • spark log
23/10/05 18:56:26 ERROR FlintJob: Fail to verify existing mapping or write result
org.apache.spark.sql.catalyst.parser.ParseException: 
Syntax error at or near 'create'(line 1, pos 5)

== SQL ==
drop create skipping index on mys3.default.http_logs
-----^^^

	at org.apache.spark.sql.catalyst.parser.ParseException.withCommand(ParseDriver.scala:306) ~[spark-catalyst_2.12-3.3.2-amzn-0.jar:3.3.2-amzn-0]
	at org.apache.spark.sql.catalyst.parser.AbstractSqlParser.parse(ParseDriver.scala:143) ~[spark-catalyst_2.12-3.3.2-amzn-0.jar:3.3.2-amzn-0]
	at org.apache.spark.sql.execution.SparkSqlParser.parse(SparkSqlParser.scala:52) ~[spark-sql_2.12-3.3.2-amzn-0.jar:3.3.2-amzn-0]
	at org.apache.spark.sql.catalyst.parser.AbstractSqlParser.parsePlan(ParseDriver.scala:89) ~[spark-catalyst_2.12-3.3.2-amzn-0.jar:3.3.2-amzn-0]
	at org.opensearch.flint.spark.sql.FlintSparkSqlParser.$anonfun$parsePlan$1(FlintSparkSqlParser.scala:60) ~[org.opensearch_opensearch-spark-standalone_2.12-0.1.0-SNAPSHOT.jar:0.1.0-SNAPSHOT]
	at org.opensearch.flint.spark.sql.FlintSparkSqlParser.parse(FlintSparkSqlParser.scala:101) ~[org.opensearch_opensearch-spark-standalone_2.12-0.1.0-SNAPSHOT.jar:0.1.0-SNAPSHOT]
	at org.opensearch.flint.spark.sql.FlintSparkSqlParser.parsePlan(FlintSparkSqlParser.scala:55) ~[org.opensearch_opensearch-spark-standalone_2.12-0.1.0-SNAPSHOT.jar:0.1.0-SNAPSHOT]
	at org.apache.spark.sql.SparkSession.$anonfun$sql$2(SparkSession.scala:620) ~[spark-sql_2.12-3.3.2-amzn-0.jar:3.3.2-amzn-0]
	at org.apache.spark.sql.catalyst.QueryPlanningTracker.measurePhase(QueryPlanningTracker.scala:192) ~[spark-catalyst_2.12-3.3.2-amzn-0.jar:3.3.2-amzn-0]
	at org.apache.spark.sql.SparkSession.$anonfun$sql$1(SparkSession.scala:620) ~[spark-sql_2.12-3.3.2-amzn-0.jar:3.3.2-amzn-0]
	at org.apache.spark.sql.SparkSession.withActive(SparkSession.scala:779) ~[spark-sql_2.12-3.3.2-amzn-0.jar:3.3.2-amzn-0]
	at org.apache.spark.sql.SparkSession.sql(SparkSession.scala:617) ~[spark-sql_2.12-3.3.2-amzn-0.jar:3.3.2-amzn-0]
	at org.apache.spark.sql.FlintJob$.executeQuery(FlintJob.scala:349) ~[org.opensearch_opensearch-spark-sql-application_2.12-0.1.0-SNAPSHOT.jar:0.1.0-SNAPSHOT]
	at org.apache.spark.sql.FlintJob$.main(FlintJob.scala:59) ~[org.opensearch_opensearch-spark-sql-application_2.12-0.1.0-SNAPSHOT.jar:0.1.0-SNAPSHOT]
	at org.apache.spark.sql.FlintJob.main(FlintJob.scala) ~[org.opensearch_opensearch-spark-sql-application_2.12-0.1.0-SNAPSHOT.jar:0.1.0-SNAPSHOT]
	at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
	at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[?:?]
	at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
	at java.lang.reflect.Method.invoke(Method.java:568) ~[?:?]
	at org.apache.spark.deploy.JavaMainApplication.start(SparkApplication.scala:52) ~[spark-core_2.12-3.3.2-amzn-0.jar:3.3.2-amzn-0]
	at org.apache.spark.deploy.SparkSubmit.org$apache$spark$deploy$SparkSubmit$$runMain(SparkSubmit.scala:1006) ~[spark-core_2.12-3.3.2-amzn-0.jar:3.3.2-amzn-0]
	at org.apache.spark.deploy.SparkSubmit.doRunMain$1(SparkSubmit.scala:180) ~[spark-core_2.12-3.3.2-amzn-0.jar:3.3.2-amzn-0]
	at org.apache.spark.deploy.SparkSubmit.submit(SparkSubmit.scala:203) ~[spark-core_2.12-3.3.2-amzn-0.jar:3.3.2-amzn-0]
	at org.apache.spark.deploy.SparkSubmit.doSubmit(SparkSubmit.scala:90) ~[spark-core_2.12-3.3.2-amzn-0.jar:3.3.2-amzn-0]
	at org.apache.spark.deploy.SparkSubmit$$anon$2.doSubmit(SparkSubmit.scala:1095) ~[spark-core_2.12-3.3.2-amzn-0.jar:3.3.2-amzn-0]
	at org.apache.spark.deploy.SparkSubmit$.main(SparkSubmit.scala:1104) ~[spark-core_2.12-3.3.2-amzn-0.jar:3.3.2-amzn-0]
	at org.apache.spark.deploy.SparkSubmit.main(SparkSubmit.scala) ~[spark-core_2.12-3.3.2-amzn-0.jar:3.3.2-amzn-0]

expected

proper error message in response. e.g. "Syntax error at or near 'create'(line 1, pos 5)"

@kaituo kaituo mentioned this issue Oct 5, 2023
6 tasks
@penghuo penghuo closed this as completed Oct 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Flint v2.11.0 Issues targeting release v2.11.0
Projects
None yet
Development

No branches or pull requests

2 participants