You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Aman Sinha (JIRA)" <ji...@apache.org> on 2014/11/21 23:33:33 UTC

[jira] [Created] (CALCITE-475) Provide ability to serialize collection of rules and uniquely identifying rules

Aman Sinha created CALCITE-475:
----------------------------------

             Summary: Provide ability to serialize collection of rules and uniquely identifying rules
                 Key: CALCITE-475
                 URL: https://issues.apache.org/jira/browse/CALCITE-475
             Project: Calcite
          Issue Type: Improvement
            Reporter: Aman Sinha
            Assignee: Julian Hyde


In order to support selectively enabling/disabling rules, it would be useful to have the following infrastructure: 

(Julian's proposal from dev mailing list):
Programs can be nested, and so there can be several instances of the same rule in the whole program. So, to disable specific instances we would need a unique identifier for a rule instance. We also need a way to print out the full program (including nested programs) that is being used. I suggest the following jira to solve both issues.

a. Add an API to serialize a program as JSON. The serialized form would include rule instances, nested programs, and other nested structures (e.g. Hep has a constructs for sequences of rules, and for loops).

The JSON would let people see what rules are being used from sqlline. (You can't disable a rule until you know which rules are used!)

b. Each rule instance would have a path, /program1/programs[3]/loop/sequence[2]. So we could allow these full paths in the regexp comma-list described above.




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)