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

Schema access authorization feature

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: In Progress
    • Minor
    • Resolution: Unresolved
    • 1.16.0
    • None
    • core

    Description

      See: https://mail-archives.apache.org/mod_mbox/calcite-dev/201711.mbox/ajax/%3C6F6E52D4-6860-4384-A1CB-A2301D05394D%40apache.org%3E

      I've looked into the core and the notion of an user could be hard to achieved now. 

      Though, I am able to implement the "hidden schema" feature through following changes:

      1. JsonSchema - add a holder for the feature, boolean flag or flags field with enum (CACHED which now exists as a separate flag - some deprecation could be needed, HIDDEN)
      2. CalciteSchema - pass through of a flag
      3. RelOptSchema - pass through of a flag
      4. CalciteCatalogReader - pass through of a flag
      5. Other derivatives of RelOptSchema - mocked value, false
      6. RelOptTable and impl - pass through of a flag
      7. SqlValidatorImpl - validation whether object from hidden schema is used (in the same places like validateAccess)
      8. ViewTableMacro.apply >  Schemas.analyzeView -> CalcitePrepareImpl.analyzeView -> CalcitePrepareImpl.parse_ -> CalcitePrepareImpl.CalcitePrepareImpl - this path of execution should build SqlValidatorImpl which has the check from point 7 disabled 

      Such feature could be useful for end users. 

      If the solution is ok - I can contribute it.

      Attachments

        Issue Links

          Activity

            People

              ptrbojko Piotr Bojko
              ptrbojko Piotr Bojko
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated: