We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
>>> pl.select(pl.lit(True) == '1') shape: (1, 1) ┌─────────┐ │ literal │ │ --- │ │ bool │ ╞═════════╡ │ true │ └─────────┘ >>> pl.select(pl.lit(True) == '2') shape: (1, 1) ┌─────────┐ │ literal │ │ --- │ │ bool │ ╞═════════╡ │ false │ └─────────┘ >>> pl.select(pl.lit(True) == 'foo') shape: (1, 1) ┌─────────┐ │ literal │ │ --- │ │ bool │ ╞═════════╡ │ false │ └─────────┘
No response
According to users in the Discord, "we are too eager to upcast things".
Expected for it to give an error, the same way it would for integers x strings
>>> pl.select(pl.lit(1) == '1') Traceback (most recent call last): [....] polars.exceptions.ComputeError: cannot compare string with numeric type (i32)
--------Version info--------- Polars: 0.20.25 Index type: UInt32 Platform: Windows-11-10.0.22631-SP0 Python: 3.12.0 (tags/v3.12.0:0fb18b0, Oct 2 2023, 13:03:39) [MSC v.1935 64 bit (AMD64)] ----Optional dependencies---- adbc_driver_manager: <not installed> cloudpickle: <not installed> connectorx: <not installed> deltalake: <not installed> fastexcel: 0.9.0 fsspec: <not installed> gevent: <not installed> hvplot: <not installed> matplotlib: 3.8.2 nest_asyncio: <not installed> numpy: 1.26.1 openpyxl: 3.1.2 pandas: 2.1.2 pyarrow: 15.0.0 pydantic: 2.5.2 pyiceberg: <not installed> pyxlsb: <not installed> sqlalchemy: 2.0.29 torch: <not installed> xlsx2csv: <not installed> xlsxwriter: <not installed>
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Checks
Reproducible example
Log output
No response
Issue description
According to users in the Discord, "we are too eager to upcast things".
Expected behavior
Expected for it to give an error, the same way it would for integers x strings
Installed versions
The text was updated successfully, but these errors were encountered: