I'm happy to make PR clarifying this. I'm a little bit concerned that if validation doesn't exist in Java (and maybe other languages today) if we make the spec stricter it could break users. How has the community handled issues like this in the past?
Would someone familiar with the Java implementation be able to comment if there is validation around this (I couldn't find it on a quick search)? Thanks, Micah On Thu, May 28, 2020 at 9:23 AM Doug Cutting <[email protected]> wrote: > Yes, the intent was to prohibit namespaces starting with a dot. > > <empty> | (<name>((<dot><name>)*)) was the intended grammar. > > Doug > > On Thu, May 28, 2020 at 1:50 AM Ryan Skraba <[email protected]> wrote: > > > Hello! Hmmm... reading through the spec (again), there is a small > > ambiguous point! Good catch! > > > > Specifically, it specifically says that ".a" is not a valid namespace > > attribute: > > > > "A namespace is a dot-separated sequence of such [non-empty] names. > > The empty string may also be used as a namespace ..." > > > > But it could be a valid full name: made from a valid namespace (the > > empty string) and a valid name. > > > > I suspect that the original intention was that it should not be a > > valid fullname, with the consequence that all valid fullnames are > > valid Java class names. > > > > If it *were* a valid fullname, however, it would be useful to > > distinguish between specifying the default namespace versus inheriting > > a namespace from a parent record! As far as I can tell, this > > behaviour isn't implemented anywhere or specified in the spec either. > > > > What do you think? The spec could be clarified either way. > > > > Ryan > > > > > > On Wed, May 27, 2020 at 7:20 PM Micah Kornfield <[email protected]> > > wrote: > > > > > > Hi Avro Dev, > > > I think there is a little bit of ambiguity in the requirements for the > > > namespace component of a full name in the specification [1]. In > > particular > > > it isn't clear whether namespaces like: > > > ".namespace" should be considered valid (i.e. a "null" namespace > > followed a > > > valid name). > > > > > > It appears the the C++ implementation does not think this is valid [2] > > but > > > I couldn't find a corresponding check in the Java code base (I'm still > > > familiarizing myself with both). > > > > > > Should ".namespace" be considered valid? > > > > > > Thanks, > > > Micah > > > > > > [1] https://avro.apache.org/docs/current/spec.html > > > [2] > > https://github.com/apache/avro/blob/master/lang/c%2B%2B/impl/Node.cc#L72 > > >
