You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[BUG] PPL query fails when using existing field name in as clause #3458
I tested with the latest implementations on v2 and Calcite, stats() as an existing name works without problems. With Calcite enabled & pushdown disabled this is not a problem.
The query source=bank | stats count() as account_number gives result as:
UPDATE: The problem arises when the field type in the table isn't compatible with the stats result.
With calcite disabled: source=bank | stats count() as lastname will throw an error as follows:
{
"error": {
"reason": "There was internal problem at backend",
"details": "java.sql.SQLException: exception while executing query: class java.lang.Double cannot be cast to class java.lang.String (java.lang.Double and java.lang.String are in module java.base of loader 'bootstrap')",
"type": "RuntimeException"
},
"status": 500
}
With Calcite enabled and pushdown disabled this is not a problem.
Activity
yuancu commentedon Jun 25, 2025
I tested with the latest implementations on v2 and Calcite, stats() as an existing name works without problems.With Calcite enabled & pushdown disabled this is not a problem.
The query
source=bank | stats count() as account_numbergives result as:The schema has account_number as a field:
UPDATE: The problem arises when the field type in the table isn't compatible with the stats result.
With calcite disabled:
source=bank | stats count() as lastnamewill throw an error as follows:With Calcite enabled and pushdown disabled this is not a problem.
LantaoJin commentedon Jun 27, 2025
this issue should be resolved in v3
qianheng-aws commentedon Oct 11, 2025
#4500 will solve this issue, both for v2 and v3