kz930 opened a new issue, #9004:
URL: https://github.com/apache/texera/issues/9004

   ### What happened?
   
   The engine looks a column up by name ignoring case: `Schema` lowercases the 
name in `getIndex`, `containsAttribute` and `remove`, and `Tuple.getField` goes 
through it. #7929 brought Projection's drop mode onto the same rule. The 
exported Python indexes the pandas frame with the name as written, which is 
case-sensitive. So when an operator's setting names a column in a different 
case from the table, the workflow runs in Texera and the exported script stops 
with a `KeyError`.
   
   This reaches every operator that names a column. On main, Projection (keep 
and drop) and Filter show it.
   
   ### How to reproduce?
   
   1. Feed a table with a column `name` into Projection, and select `Name`. The 
engine keeps the column.
   2. Export the workflow as Python and run it on the same table. It raises 
`KeyError: "None of [Index(['Name'], dtype='object')] are in the [columns]"`.
   3. Likewise, Filter with the predicate `Name = a` keeps the matching row in 
the engine and raises `KeyError: 'Name'` in the export.
   
   A column picked from the editor's dropdown has the table's exact case, so 
this shows only for a hand-edited workflow, or after an upstream column changes 
case.
   
   ### Version/Branch
   
   1.4.0-incubating-SNAPSHOT (main)
   
   ### Commit Hash (Optional)
   
   742643133
   
   ### What browsers are you seeing the problem on?
   
   _No response_
   
   ### Relevant log output
   
   ```shell
   KeyError: "None of [Index(['Name'], dtype='object')] are in the [columns]"
   ```
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to