@Override public String getVerboseMessage(boolean includeErrorIdAndIdentity) { StringBuilder sb = new StringBuilder(); sb.append(error.getMessage()); if (error.getContextCount() > 0) { sb.append("\n\n"); for (String context : error.getContextList()) { sb.append(context).append("\n"); } } if (error.hasException()) { sb.append("\n"); for (UserBitShared.StackTraceElementWrapper stackLine : error.getException().getStackTraceList()) { sb.append(stackLine.getClassName()) .append("(") .append(stackLine.getFileName()) .append(":") .append(stackLine.getLineNumber()) .append(")\n"); } } return sb.toString(); }
DremioPBError remoteError = ure.getOrCreatePBError(false); ExceptionWrapper ew = remoteError.getException(); Class<? extends Throwable> exceptionClazz; do {
mergeException(other.getException());
public void writeTo(io.protostuff.Output output, com.dremio.exec.proto.UserBitShared.DremioPBError message) throws java.io.IOException { if(message.hasErrorId()) output.writeString(1, message.getErrorId(), false); if(message.hasEndpoint()) output.writeObject(2, message.getEndpoint(), com.dremio.exec.proto.SchemaCoordinationProtos.NodeEndpoint.WRITE, false); if(message.hasErrorType()) output.writeEnum(3, message.getErrorType().getNumber(), false); if(message.hasMessage()) output.writeString(4, message.getMessage(), false); if(message.hasException()) output.writeObject(5, message.getException(), com.dremio.exec.proto.SchemaUserBitShared.ExceptionWrapper.WRITE, false); for(com.dremio.exec.proto.UserBitShared.ParsingError parsingError : message.getParsingErrorList()) output.writeObject(6, parsingError, com.dremio.exec.proto.SchemaUserBitShared.ParsingError.WRITE, true); if(message.hasOriginalMessage()) output.writeString(1001, message.getOriginalMessage(), false); for(String context : message.getContextList()) output.writeString(1002, context, true); if(message.hasTypeSpecificContext()) output.writeByteArray(1003, message.getTypeSpecificContext().toByteArray(), false); } public boolean isInitialized(com.dremio.exec.proto.UserBitShared.DremioPBError message)
@Test(expected = UnsupportedRelOperatorException.class) @Ignore public void testUnionDistinctViewUnExpandableStar() throws Exception { test("use dfs_test.tmp"); test("create view nation_view_testunion as select * from cp.\"tpch/nation.parquet\";"); try { String query = "(select * from dfs_test.tmp.\"nation_view_testunion\") \n" + "union (select * from cp.\"tpch/region.parquet\")"; test(query); } catch(UserException ex) { SqlUnsupportedException.errorClassNameToException(ex.getOrCreatePBError(false).getException().getExceptionClass()); throw ex; } finally { test("drop view nation_view_testunion"); } }
private static void throwAsUnsupportedException(UserException ex) throws Exception { SqlUnsupportedException.errorClassNameToException(ex.getOrCreatePBError(false).getException().getExceptionClass()); throw ex; }
private static void throwAsUnsupportedException(UserException ex) throws Exception { SqlUnsupportedException.errorClassNameToException(ex.getOrCreatePBError(false).getException().getExceptionClass()); throw ex; }