ClickHouse / ClickHouse/ClickHouse.EntityFrameworkCore

Code 47 UNKNOWN_IDENTIFIER: Identifier 's.id' cannot be resolved from subquery with name s ... Maybe you meant: ['s.id1']

Open
#66 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
C#
Stars
23
Forks
7
Avg merge
14d 3h
Merged PRs (30d)
1

Description

When querying with LINQ and adding nested navigation props with Include or ThenInclude e.g.:
```
var parent = await ctx.Parents
.Where(p => p.Id == 1L)
.Include(p => p.Children)
.ThenInclude(c => c.GrandChildren)
.SingleOrDefaultAsync();
```
an error occurs:

ClickHouse.Driver.ClickHouseServerException (0x0000002F): Code: 47. DB::Exception: Identifier 's.id' cannot be resolved from subquery with name s. In scope SELECT c0.id, ..., s.id AS id0, .... Maybe you meant: ['s.id1']. (UNKNOWN_IDENTIFIER) (version 25.8.29.51 (official build))

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the reported LINQ query with Include and ThenInclude against ClickHouse, then inspect the generated query around the unresolved s.id and s.id1 identifiers. Done means the nested navigation query executes successfully without the Code 47 UNKNOWN_IDENTIFIER error.

Written by the indexing model from the issue text.

Assessment

Tech stack
clickhouse, csharp
Domain
database
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
50/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.