Details
-
Improvement
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
3.0.0-beta1
Description
It is possible to remove default placeholders altogether and insert default value s for columns at the sql to relnode conversion phase.
Note
A) In order to avoid code duplication use TableDescriptorImpl::newColumnDefaultValue.
B) Calcite generates different RelNode trees for queries INSERT INTO tmp (a) VALUES (1) and INSERT INTO tmp (a, b) VALUES (1, DEFAULT). For the first query calcite supplies DEFAULT values by calling TableDescriptorImpl::newColumnDefaultValue, but for the second query it does not do it.
C) Since the values operator in Calcite can contain only literals, plans for INSERT statements for tables with implicit primary key and without it are different. When a table has an implicit primary key, Calcite adds a projection operator with a call to gen_random_uuid() and uses values operator as input of that projection.
Attachments
Issue Links
- incorporates
-
IGNITE-20253 Backport IGNITE-19096 Sql. Remove code that replaces placeholder values from ModifyNode
- Resolved
- links to