drill-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Parth Chandra" <pchan...@maprtech.com>
Subject Re: Review Request 35808: DRILL-2862: Convert_to/Convert_From throw assertion when an incorrect encoding type is specified
Date Wed, 24 Jun 2015 16:53:46 GMT

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/35808/
-----------------------------------------------------------

(Updated June 24, 2015, 4:53 p.m.)


Review request for drill, Jinfeng Ni and Sudheesh Katkam.


Changes
-------

Added check for DRILL-2648 case. 
Rebased on master.


Repository: drill-git


Description
-------

DRILL-2862: Convert_to/Convert_From throw assertion when an incorrect encoding type is specified
or if the encoding type is not a string literal.

Instead of an assertion when user input is wrong, we now throw an exception with the appropriate
error message. 
For the case where the user types in a type name incorrectly, the error message also provides
a helpful suggestion. The suggested name is selected from the list of available functions.

For example: 

  select convert_from(foo, 'UTF') from dfs.`/table_foo`

will print the following error:

  Error: UNSUPPORTED_OPERATION ERROR: CONVERT_FROM does not support conversion from type 'UTF'.
  Did you mean UTF8?
  [Error Id: 87ed2941-f9c2-4c35-8ff2-a3f21eae1104 on localhost:31010] (state=,code=0)


Diffs (updated)
-----

  exec/java-exec/src/main/java/org/apache/drill/exec/planner/logical/PreProcessLogicalRel.java
0f8e45a 
  exec/java-exec/src/main/java/org/apache/drill/exec/util/ApproximateStringMatcher.java PRE-CREATION


Diff: https://reviews.apache.org/r/35808/diff/


Testing
-------

All regression tests


Thanks,

Parth Chandra


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message