Uploaded image for project: 'Calcite'
  1. Calcite
  2. CALCITE-4539

Support pluggable metadata handlers and caching

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • core

    Description

      Calcite janino backed metadata does not support all the functionality that the java reflection backed metadata system, such as customizing the cache to use soft refs or have a max size.  Furthermore, the janino backed metadata provider has many opinion that other are not universally shared, such as lazy loading, requiring all rels to registered to a global singleton, use of thread locals.  There is no easy way to currently override these opinions.

      Calcites metadata system should consist of 3 APIs: metadata consumer, metadata implementors, metadata behavior.  The metadata consumer need to able to fetch the appropriate metadata and invalidate the cache.  Currently this is all done through RelMetadataQuery with some very leaky abstractions.  Metadata implementors create functions that extract the metadata for particular node types.  These functions are registered via ReflectiveRelMetadataProvider and ChainedRelMetadataProvider.  Attempting to configure the internal behavior does not currently have an api.  Currently portions of it a scattered through out various class and are frequently not extensible.  These could all be concentrated in a single class MetadataHandlerProvider, to allow for configuration of eager/lazy loading behavior, caching policy(thread safe, max size, soft references), or a clear api for some to go their own way for handler generation. 

       

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              jamesstarr James Starr
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 4h 20m
                  4h 20m