-
Notifications
You must be signed in to change notification settings - Fork 604
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bug(bigquery): different name of column in sql code and table.columns #9112
Comments
Rewrite the problem description with an easy example |
Updated the error message*******
seems like |
We probably need to see the ibis expression. Column names that look like that should effectively never make it into bigquery. Can you give a reproducible example that only uses Ibis? We definitely need to see what Ibis APIs you're using to produce this error. |
we convert an intermediate table into a The intermediate information in the expression tree got lost, unfortunately, the new name I think it is not an ibis issue, we could fix this in ibisml. Here is the simplified code to reproduce the error: import ibis
ibis.options.interactive = True
con = ibis.bigquery.connect(project_id="xx", dataset_id="xx")
t = ibis.memtable({
"x": ["a", "b"],
"y": ["0", "1"]
})
con.create_table(
"t", t.to_pyarrow(), overwrite=True
)
t = con.table("t")
base_table = t.drop("y")
target_table = t.y.cast(dt.float64)
y_m = ibis.memtable(target_table.as_table().to_pyarrow())
y_m = y_m.mutate(x=ibis.literal("a"))
base_table.join(y_m, "x") And the new name ibis.to_sql(y_m)
|
Removes extra whitespace from the generated field name. xref #9112 but doesn't strictly solve the issue
What happened?
Here is the code could be used to reproduce the error:
when I run
I got
['Cast(y, int64)']
But the name in sql code is different in
ibis.to_sql(y)
- name in sql code isCast_y_ int64
This will produce errors in ibisml, becuase ibisml use the table's column name to extract target - https://github.com/ibis-project/ibis-ml/blob/main/ibisml/core.py#L135
Errror
Updated the error message*******
Not very sure, we should solve this in ibis or ibisml.
What version of ibis are you using?
9
What backend(s) are you using, if any?
bigquery
Relevant log output
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: