Comments (6)
I updated the issue to make it clear that is not only a problem with literals.
from arrow-datafusion.
Taking into account the fact that DataFusion’s SqlParserOptions already has an option to specify different Sql dialects (and different dialects process this length/precision parameter in CAST expression differently - see examples below), adding a config parameter seems like a very reasonable approach.
SQLLite:
SELECT CAST('12345' AS VARCHAR(2))
12345
BigQuery:
SELECT CAST('12345' AS STRING(2))
Parameterized types are not allowed in CAST expressions.
from arrow-datafusion.
take
from arrow-datafusion.
Maybe we should simply error if DataFusion encouters a type of VARCHAR
with an explcit length 🤔 Though if I worry that some people might expect it to work the way it currenty does (ignored)
Perhaps we could make a new configuration setting to control the behavior (error_on_varchar_with_length
or something),
from arrow-datafusion.
Maybe we should simply error if DataFusion encouters a type of
VARCHAR
with an explcit length 🤔 Though if I worry that some people might expect it to work the way it currenty does (ignored)Perhaps we could make a new configuration setting to control the behavior (
error_on_varchar_with_length
or something),
Current idea should be adding a new config parameter and when encounter VARCHAR with specific length, we throw an error. Don't know if it works for you @lowka
from arrow-datafusion.
Taking into account the fact that DataFusion’s SqlParserOptions already has an option to specify different Sql dialects (and different dialects process this length/precision parameter in CAST expression differently - see examples below), adding a config parameter seems like a very reasonable approach.
SQLLite:
SELECT CAST('12345' AS VARCHAR(2)) 12345
BigQuery:
SELECT CAST('12345' AS STRING(2)) Parameterized types are not allowed in CAST expressions.
Sure, I will do it
from arrow-datafusion.
Related Issues (20)
- Add fuzz tests for SortMergeJoin spilling
- ExprBuilder for Physical Aggregate Expr
- Use SimpleExtensions for Substrait type variations
- Provide valid extensionUris and extensionUriReferences in Substrait
- Easier Dataframe API for `map` HOT 17
- Crash bug when `log()` is used in `order by` clause (SQLancer)
- Parsing SQL strings to Exprs wtih the qualified schema HOT 1
- Query with `order by acos(sin(v1))` panic (SQLancer) HOT 2
- Add reservoir sampling HOT 1
- Intermittent failures in `fuzz_cases::join_fuzz::test_anti_join_1k_filtered` HOT 3
- signum function incompatible with Postgres and Apache Spark HOT 4
- Internal error when there is a bitwise operation in `order by` clause (SQLancer) HOT 1
- Fix clippy lint for the number of arguments to `CsvExec::new()` HOT 1
- Update ClickBench benchmarks with DataFusion 40 HOT 1
- Building time for `cargo bench` takes quite a long time HOT 1
- Potential optimization for CASE WHEN for protecting against divide by zero HOT 1
- Add a sub-project for map udf functions HOT 5
- always failed test on datasource::file_format::csv::tests::test_csv_parallel_one_col::case_6 on windows machine
- Update Optimizer documentation
- Implement `evaluate_bounds` for math unary functions HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from arrow-datafusion.