Yes,you are right,GCE is OK.

Therefore, either remove the description from Ignite's documentation or migrate the function from GCE back to Ignite.

在 2022/1/11 15:20, Ilya Korol 写道:
I've checked latest master and didn't find any mentions of HASH_JOIN_IDX in it (except documentation sources). Meanwhile in gridgain community repository you can find HashJoinIndex class (https://github.com/gridgain/gridgain/blob/master/modules/h2/src/main/java/org/gridgain/internal/h2/index/HashJoinIndex.java) and other code like:

// Parser
private IndexHints parseIndexHints(Table table) {
    read(OPEN_PAREN);
    LinkedHashSet<String> indexNames = new LinkedHashSet<>();
    if (!readIf(CLOSE_PAREN)) {
        do {
            String indexName = readIdentifierWithSchema();
            if (HashJoinIndex.HASH_JOIN_IDX.equalsIgnoreCase(indexName)) {
                indexNames.add(HashJoinIndex.HASH_JOIN_IDX);
            }
            else {
                Index index = table.getIndex(indexName);
                indexNames.add(index.getName());
            }
        } while (readIfMore(true));
    }
    return IndexHints.createUseIndexHints(indexNames);
}

So, looks like this feature implementation is absent in Ignite (or was removed for some reasons).

On 2022/01/06 09:34:41 38797715 wrote:
> Execute the following script and the error will occur:
>
> CREATE TABLE Country (
>   Code CHAR(3) 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 CHAR(2)
> ) WITH "template=partitioned, backups=1, CACHE_NAME=Country,
> VALUE_TYPE=demo.model.Country";
>
> CREATE TABLE City (
>   ID INT,
>   Name VARCHAR,
>   CountryCode CHAR(3),
>   District VARCHAR,
>   Population INT,
>   PRIMARY KEY (ID, CountryCode)
> ) WITH "template=partitioned, backups=1, CACHE_NAME=City,
> KEY_TYPE=demo.model.CityKey, VALUE_TYPE=demo.model.City";
>
>
> CREATE INDEX idx_country_code ON city (CountryCode);
>
> INSERT INTO City(ID, Name, CountryCode, District, Population) VALUES
> (1,'Kabul','AFG','Kabol',1780000);
> INSERT INTO City(ID, Name, CountryCode, District, Population) VALUES
> (2,'Qandahar','AFG','Qandahar',237500);
>
> INSERT INTO Country(Code, Name, Continent, Region, SurfaceArea,
> IndepYear, Population, LifeExpectancy, GNP, GNPOld, LocalName,
> GovernmentForm, HeadOfState, Capital, Code2) VALUES
> ('AFG','Afghanistan','Asia','Southern and Central
> Asia',652090.00,1919,22720000,45.9,5976.00,NULL,'Afganistan/Afqanestan','Islamic
> Emirate','Mohammad Omar',1,'AF');
>
> SELECT *
> FROM city,country USE INDEX(HASH_JOIN_IDX)
> WHERE city.CountryCode = country.code;
>
> see the doc:
>
> https://ignite.apache.org/docs/latest/SQL/distributed-joins#hash-joins
>
> why?
>
> is a bug?
>

Reply via email to