none
Arbitrary TypeName Type Facets? RRS feed

  • Question

  • Hello,

    When a type value like Int8.Type or Decimal.Type is ascribed to a number, the name of that type value shows up in Table.Schema's TypeName column.

    Table.Schema(Table.FromValue(Value.ReplaceType(1, Decimal.Type))){0}[TypeName] // Decimal.Type

    (Context: What the above TypeName column shows is really just a textual claim, or facet, about the type. It is not the underlying type's name, which is still type number, as revealed by column Kind. So, the above value is a number that claims to be a decimal.)

    Is there a way to ascribe an arbitrary TypeName claim to a type so that it shows up in the Table.Schema's TypeName column (e.g. a way to set the type so that "Currency.Type" or "Ben.Type" shows up in this column)? I haven't found a way to do this, making me think that ability is internal-only, but want to conform so that I'm accurate when I write/teach about this.

    Thanks,

    Ben

    Tuesday, February 4, 2020 3:37 PM

Answers

All replies