Igor Gusev created IGNITE-26449:
-----------------------------------
Summary: Improve error message when user specifies string over
identifier
Key: IGNITE-26449
URL: https://issues.apache.org/jira/browse/IGNITE-26449
Project: Ignite
Issue Type: Task
Reporter: Igor Gusev
When executing SQL and using the string name, the error can be confusing
{code:java}
sql-cli> CREATE TABLE Country (
> Code VARCHAR PRIMARY KEY,
> Name VARCHAR,
> Continent VARCHAR,
> Region VARCHAR,
> SurfaceArea DECIMAL(10,2),
> IndepYear SMALLINT,
> Population INT,
> LifeExpectancy DECIMAL(3,1),
> GNP DECIMAL(10,2),
> GNPOld DECIMAL(10,2),
> LocalName VARCHAR,
> GovernmentForm VARCHAR,
> HeadOfState VARCHAR,
> Capital INT,
> Code2 VARCHAR
> ) ZONE "storageZone" STORAGE PROFILE 'default';
SQL query execution error
Distribution zone with name 'storageZone' not found{code}
It is not clear that the storageZone zone was created with an identifier. We
should improve the error to direct users more
Possible solutions:
# Check if the object with the specified name exists and direct users to it.
Something along the lines of
{code:java}
Distribution zone with name "storageZone" not found. Did you mean STORAGEZONE?
{code}
# Make the error more verbose to include possible cause
{code:java}
Distribution zone with name 'storageZone' not found. This could be caused by a
naming mistake, or using a case-sensitive name instead of an identifier.{code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)