Konstantin Orlov created IGNITE-19789:
-----------------------------------------

             Summary: Sql. Introduce RowSchema for RowFactory
                 Key: IGNITE-19789
                 URL: https://issues.apache.org/jira/browse/IGNITE-19789
             Project: Ignite
          Issue Type: Improvement
          Components: sql
            Reporter: Konstantin Orlov


There are three way to create 
{{org.apache.ignite.internal.sql.engine.exec.RowHandler.RowFactory}}:

{code:java}
RowFactory<RowT> factory(IgniteTypeFactory typeFactory, RelDataType rowType);
RowFactory<RowT> factory(IgniteTypeFactory typeFactory, List<RelDataType> 
fieldTypes);
RowFactory<RowT> factory(Type... types);
{code}

The first two create unnecessary dependency on {{calcite}} library, the last 
one doesn't provide required type's parameters, like decimal scale, for 
instance.

Let's replace all three methods with a single {{RowFactory<RowT> 
factory(RowSchema schema)}}, where {{RowSchema}} is a class that should be 
introduced.

h4. Implementation Notes

Although {{org.apache.ignite.internal.schema.BinaryTupleSchemas}} might seem 
like a good candidate on the role of RowSchema, it doesn't have exhaustive 
type's support. Besides, introducing new type to binary tuple is much complex 
procedure since it will affect every module. Thus, it's better to implement 
distinct schema optimised for RowHandler|RowFactory use case.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to