Java Code Examples for org.apache.arrow.vector.types.pojo.ArrowType.FloatingPoint#getPrecision()
The following examples show how to use
org.apache.arrow.vector.types.pojo.ArrowType.FloatingPoint#getPrecision() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: SqlDisplaySizeVisitor.java From dremio-oss with Apache License 2.0 | 5 votes |
@Override public Integer visit(FloatingPoint paramFloatingPoint) { switch(paramFloatingPoint.getPrecision()){ case SINGLE: return 14; // sign + 7 digits + decimal point + E + 2 digits case DOUBLE: return 24; // sign + 15 digits + decimal point + E + 3 digits default: throw new IllegalStateException("unable to report width for floating point of width " + paramFloatingPoint.getPrecision()); } }
Example 2
Source File: SqlTypeNameVisitor.java From dremio-oss with Apache License 2.0 | 5 votes |
@Override public String visit(FloatingPoint paramFloatingPoint) { switch(paramFloatingPoint.getPrecision()){ case SINGLE: return "FLOAT"; case DOUBLE: return "DOUBLE"; default: throw new IllegalStateException("unable to report sql type for floating point of width " + paramFloatingPoint.getPrecision()); } }
Example 3
Source File: Describer.java From dremio-oss with Apache License 2.0 | 4 votes |
@Override public String visit(FloatingPoint type) { return type.getPrecision() == FloatingPointPrecision.SINGLE ? "float" : "double"; }