Class ElasticsearchRel.Implementor

  • Enclosing interface:
    ElasticsearchRel

    public static class ElasticsearchRel.Implementor
    extends java.lang.Object
    Callback for the implementation process that converts a tree of ElasticsearchRel nodes into an Elasticsearch query.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      (package private) java.util.List<java.util.Map.Entry<java.lang.String,​java.lang.String>> aggregations
      Elastic aggregation (MIN / MAX / COUNT etc.) statements (functions).
      (package private) ElasticsearchTable elasticsearchTable  
      (package private) java.util.Map<java.lang.String,​java.lang.String> expressionItemMap
      Keeps mapping between calcite expression identifier (like EXPR$0) and original item call like _MAP['foo.bar'] (foo.bar really).
      (package private) java.lang.Long fetch
      Number of records to return.
      (package private) java.util.List<java.lang.String> groupBy
      Allows bucketing documents together.
      (package private) java.util.List<java.lang.String> list  
      (package private) java.lang.Long offset
      Starting index (default 0).
      (package private) java.util.List<java.util.Map.Entry<java.lang.String,​RelFieldCollation.Direction>> sort
      Sorting clauses.
      (package private) RelOptTable table  
    • Constructor Summary

      Constructors 
      Constructor Description
      Implementor()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      (package private) void add​(java.lang.String findOp)  
      (package private) void addAggregation​(java.lang.String field, java.lang.String expression)  
      (package private) void addExpressionItemMapping​(java.lang.String expressionId, java.lang.String item)  
      (package private) void addGroupBy​(java.lang.String field)  
      (package private) void addSort​(java.lang.String field, RelFieldCollation.Direction direction)  
      (package private) void fetch​(long fetch)  
      (package private) void offset​(long offset)  
      (package private) void visitChild​(int ordinal, RelNode input)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • list

        final java.util.List<java.lang.String> list
      • aggregations

        final java.util.List<java.util.Map.Entry<java.lang.String,​java.lang.String>> aggregations
        Elastic aggregation (MIN / MAX / COUNT etc.) statements (functions).
        See Also:
        aggregations
      • groupBy

        final java.util.List<java.lang.String> groupBy
        Allows bucketing documents together. Similar to select ... from table group by field1
        See Also:
        Bucket Aggregrations
      • expressionItemMap

        final java.util.Map<java.lang.String,​java.lang.String> expressionItemMap
        Keeps mapping between calcite expression identifier (like EXPR$0) and original item call like _MAP['foo.bar'] (foo.bar really). This information otherwise might be lost during query translation.
        See Also:
        SqlStdOperatorTable.ITEM
      • offset

        java.lang.Long offset
        Starting index (default 0). Equivalent to start in ES query.
        See Also:
        From/Size
      • fetch

        java.lang.Long fetch
        Number of records to return. Equivalent to size in ES query.
        See Also:
        From/Size
    • Constructor Detail

      • Implementor

        public Implementor()
    • Method Detail

      • add

        void add​(java.lang.String findOp)
      • addGroupBy

        void addGroupBy​(java.lang.String field)
      • addAggregation

        void addAggregation​(java.lang.String field,
                            java.lang.String expression)
      • addExpressionItemMapping

        void addExpressionItemMapping​(java.lang.String expressionId,
                                      java.lang.String item)
      • offset

        void offset​(long offset)
      • fetch

        void fetch​(long fetch)
      • visitChild

        void visitChild​(int ordinal,
                        RelNode input)