opensearch-project / opensearch-project/sql

[BUG] SQLBinaryOpExpr casting error to SQLIdentifierExpr

Open
#1,674 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

legacy SQL
Dominant language
Java
Stars
176
Forks
229
Avg merge
2d 21h
Merged PRs (30d)
43

Description

@esfomeado commented on Thu May 04 2023

Describe the bug

class com.alibaba.druid.sql.ast.expr.SQLBinaryOpExpr cannot be cast to class com.alibaba.druid.sql.ast.expr.SQLIdentifierExpr (com.alibaba.druid.sql.ast.expr.SQLBinaryOpExpr and com.alibaba.druid.sql.ast.expr.SQLIdentifierExpr are in unnamed module of loader java.net.FactoryURLClassLoader

To Reproduce
Steps to reproduce the behavior:

  1. Go to 'Query Workbench'
  2. Run SQL query select * from 5c2c1c54-8abd-4dae-bbd4-1022c6012925
  3. See error

Expected behavior
Should not throw error

OpenSearch Version
2.5.0

Dashboards Version
2.5.0

Plugins

Everything is default

Screenshots

image

If applicable, add screenshots to help explain your problem.

Host/Environment (please complete the following information):

  • OS: Windows 10
  • Browser and version Chrome 113

Additional context

Add any other context about the problem here.


@zhongnansu commented on Thu May 04 2023

@opensearch-project/triage Please transfer this issue to workbench repo https://github.com/opensearch-project/dashboards-query-workbench

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in the Query Workbench entry point and reproduce the failure with select * from 5c2c1c54-8abd-4dae-bbd4-1022c6012925 on the reported 2.5.0 versions. Trace the SQL parsing or casting path that produces the SQLBinaryOpExpr-to-SQLIdentifierExpr error; done means the query no longer throws that error. The issue requests transfer to the dashboards-query-workbench repository, so confirm the target repository before starting.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, sql
Domain
backend, databases
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.