Comments (4)
Adding implicit casts between numbers and strings can be problematic because it may introduce ambiguities when resolving which functions and operators to call.
It also introduces usability problems. Take a look at these examples:
1 == '1'
is true but 2.0 == '2' is false
9 < 10
is true but 9 < '10'
or '9' < 10
is false
In the future, we plan to allow users to define implicit casts via plugins, but that's a longer term feature. We don't expect to have this feature built into the core, though, for all the reasons above and the fact that it's not standard SQL behavior.
It take huge cost changes for rewrite Hive scripts
Perhaps, what would be valuable is for someone to build a tool to translate between Hive queries and Presto queries.
from trino.
I don't think implicit number -> string
cast is part of SQL standard:
A number is assignable only to sites of numeric type.
If an assignment of some number would result in a loss of its most significant digit, an exception condition is raised.
If least significant digits are lost, implementation- defined rounding or truncating occurs, with no exception condition being raised.
The rules for arithmetic are specified in Subclause 6.26, “<numeric value expression>”.
Maybe we could have a compatibility toggle for such feature? @martint ?
from trino.
Ye. Good idea. It is good for both.
from trino.
Hey, is this being taken up anytime soon ? If not as a default, probably can be provided as an option to user to set true before running a query like hive.groupby.orderby.position.alias=true
from trino.
Related Issues (20)
- Flaky test TestDeltaLakeAlluxioCacheMinioAndHmsConnectorSmokeTest.testCreateOrReplaceTableConcurrently: `Read -1 bytes from cache` HOT 3
- Support CREATE VIEW in JDBC-based connectors for MS SQL Server HOT 1
- Flaky tests due to insufficient synchronization in FileHiveMetastore
- Update MERGE exception and message for jdbc connectors
- Use IcebergQueryRunner in TestIcebergRegisterTableProcedure
- Flaky `TestIcebergMinioParquetCachingConnectorSmokeTest.testDeleteRowsConcurrently`
- Incorrect evaluation for IN with failing term
- Flaky TestHiveRuntimeAdaptivePartitioningFaultTolerantExecutionJoinQueries.testJoinWithMultipleInSubqueryClauses
- Iceberg optimizer timeout HOT 4
- Snowflake CI keeps facing timeout HOT 4
- Documentation of Fault-tolerant-execution HOT 1
- Parameterised query does not work for either json_query or json_valaue
- How does the shared-secret secure internal communication interact with Kerberos authentication? HOT 1
- Feature request: hive.s3.skip-glacier-objects - skips restored object
- (probably) need cloud trino HOT 2
- When using Trino to optimize Iceberg tables, my table data exceeded 5 billion rows. Since Iceberg's optimization feature does not enable disk swapping, the optimization fails due to insufficient memory. Is there a solution? HOT 1
- Trino CDF issue, Shallow clone table_changes doesn't contain base_table rows
- Support remote-signing in Trino Iceberg connector
- Enable Snowflake limit pushdown test
- Flaky test TestPinotConnectorTest
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 trino.