calcite-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hartman, Trevor" <thart...@ebay.com>
Subject Guidance for writing a Calcite adapter for a deep hierarchical dataset
Date Wed, 08 Oct 2014 16:43:09 GMT
I'm trying to write an adapter for a custom distributed columnar in-memory database. I don't
see much for docs beyond a few simple examples:

http://java.dzone.com/articles/sql-over-anything-optiq
https://github.com/julianhyde/optiq-csv/blob/master/TUTORIAL.md

I'm particularly interested in how to enable selecting fields from deeply nested children.
After much googling, I've only seen a few passing mentions of sub-schemas (in TUTORIAL.md
and in the old optiq-dev Google Group), but haven't seen examples. I've also seen mentions
of _MAP row types. Which one would be appropriate here? For example, here is a very small
part of my Schema:

Listings (this is the only top level "table")
Fields:
  - listingId
  - siteId
  - etc...

Child schemas:
  - Categories
    Fields:
    - categoryId

  - Keywords
    Fields:
    - day
    - keyword

This is a very tiny sample of the full hierarchical schema, showing 2 levels, but in reality
schemas are arbitrarily deeply nested.

Could anyone provide some guidance here? Is this a good case for implementing many sub-schemas
and making them accessible via OptiqSchema#getSubSchema, or is it a _MAP row type as seen
here<https://github.com/julianhyde/optiq-csv/blob/master/src/main/java/net/hydromatic/optiq/impl/csv/JsonTable.java#L53>?

Thanks,
Trevor
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message