Skip to content

Commit

Permalink
RFC 2.1 semantics wg (#102)
Browse files Browse the repository at this point in the history
Add clarification about how to find unit for the
1st argument of `IN_UNIT` + add an two successful examples
  • Loading branch information
gmantele authored Nov 10, 2023
1 parent 57d6cdd commit 23d4513
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion ADQL.tex
Original file line number Diff line number Diff line change
Expand Up @@ -2757,11 +2757,21 @@ \subsubsection{IN\_UNIT}
The \verb:IN_UNIT(): function returns the value of the first argument
transformed into the unit defined by the second argument.

The first argument MUST be a numeric value expression.
The first argument MUST be a numeric value expression. If this argument is a
column name, the VOUnits for this column ought to be found in the metadata
attached to this column (e.g. \verb|TAP_SCHEMA.columns.unit| in a TAP service).

The second argument MUST be a string literal containing a valid unit
description using the formatting defined in the \VOUnitSpec{}.

Example:

\begin{verbatim}
-- ra: column expressed in 'deg'
IN_UNIT(ra, 'rad') -- OK
IN_UNIT(ra, 'arcmin') -- OK
\end{verbatim}

It has to be noted that a unitless value, as defined by the \VOUnitSpec{}, can not
be converted. Similarly a non-unitless value can not be converted into a
unitless one.
Expand Down

0 comments on commit 23d4513

Please sign in to comment.