Uploaded image for project: 'Ignite'
  1. Ignite
  2. IGNITE-15253

Tuple API improvement.

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Critical
    • Resolution: Fixed
    • None
    • 3.0.0-alpha3
    • sql
    • Docs Required, Release Notes Required

    Description

      Motinvation.

      For now, Tuple is an interface and the standard way for creation is to use TupleBuilder that can be got using Table API.

      1. As we thought, normally, Tuple is decoupled from any Ignite internals.
      Our implementation, which is returned from Ignite (e.g. Table API methods), may rely on the internals in some cases, e.g. we need a way to wrap table Row into Tuple for performance sake.
      This is questionable, let's discuss if Tuple should/can be a public class or be mutable or left as is, and then fix it.

      2. TupleBuilder factory methods in TableView interfaces causes a question:
      Is the builder binded to a particular Table/View? or not?
      As it is possible for a user to pass an arbitrary implementation of Tuple (unless Tuple is not a final class or has public constructor), hence we must move data validation from Builder to the Table.
      This causes a question: Do we need separate interface Builder or MutableTuple?

      Description.

      Let'd discuss questions above and fix it.

      • move Tuple validation from TupleBuilder to Table API.
      • make Tuple.columnIndex() return a primitive (-1 instead of 'null')
      • decouple Tuple from Table API and provide convenient way for Tuple creation.

      Attachments

        Issue Links

          Activity

            People

              amashenkov Andrey Mashenkov
              amashenkov Andrey Mashenkov
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 1h 50m
                  1h 50m