Datomic Analytics: Naming case sensitivity / preservation

I’m noticing a couple of quirks in how datomic analytics deals with character-case. First of all, in the process of generating SQL names from idents, everything is coming out lowercase, even if the ident contains uppercase characters. The docs only reference that names must be alphanumeric, not that they must also be lowercase. Maybe this is a presto limitation, but it would be nice if we could get case-preserving names for SQL, even if they aren’t case sensitive for query. That is, I’d be fine with case-only differences between names to be illegal, after all, the name munging process already creates a possibility for other collisions.

Where things get a little bit surprising (probably as a result of the above) is when you need to reference a renamed table in :join in metaschema. Even if a table :name is specified with uppercase characters, the :join specification must be lowercase.

For example, this does not work as expected:

{
  :tables {
    :sfdc.Lead/Id {
      :name "Lead"      
    }    
    :sfdc.Lead.Industry/value {
      :name "Lead_Industry"
    }
  }
  :joins {
    :sfdc.Lead/Industry "Lead_Industry"    
  }
}

But this does work

{
  :tables {
    :sfdc.Lead/Id {
      :name "Lead"      
    }    
    :sfdc.Lead.Industry/value {
      :name "Lead_Industry"
    }
  }
  :joins {
    :sfdc.Lead/Industry "lead_industry"    
  }
}