Login  Register

Re: No error on executing 'IN' operator without specifying any columnname

Posted by prabhatkashyap on Nov 01, 2016; 6:44am
URL: http://apache-carbondata-dev-mailing-list-archive.168.s1.nabble.com/No-error-on-executing-IN-operator-without-specifying-any-column-name-tp2424p2485.html

When ever I'm trying to run following command in HIVE:
select id from nt1 where nt1.id IN (select id from nt2);
it executes normally in HIVE, but the same query gives the following error in CARBONDATA :

org.apache.spark.sql.AnalysisException:
Unsupported language features in query: select id from emp4 where emp4.id IN (select id from emp5)
TOK_QUERY 1, 0,24, 15
  TOK_FROM 1, 4,6, 15
    TOK_TABREF 1, 6,6, 15
      TOK_TABNAME 1, 6,6, 15
        emp4 1, 6,6, 15
  TOK_INSERT 0, -1,24, 0
    TOK_DESTINATION 0, -1,-1, 0
      TOK_DIR 0, -1,-1, 0
        TOK_TMP_FILE 0, -1,-1, 0
    TOK_SELECT 1, 0,2, 7
      TOK_SELEXPR 1, 2,2, 7
        TOK_TABLE_OR_COL 1, 2,2, 7
          id 1, 2,2, 7
    TOK_WHERE 1, 8,24, 34
      TOK_SUBQUERY_EXPR 1, 10,24, 34
        TOK_SUBQUERY_OP 1, 14,14, 34
          IN 1, 14,14, 34
        TOK_QUERY 1, 16,24, 53
          TOK_FROM 1, 21,23, 53
            TOK_TABREF 1, 23,23, 53
              TOK_TABNAME 1, 23,23, 53
                emp5 1, 23,23, 53
          TOK_INSERT 0, -1,19, 0
            TOK_DESTINATION 0, -1,-1, 0
              TOK_DIR 0, -1,-1, 0
                TOK_TMP_FILE 0, -1,-1, 0
            TOK_SELECT 1, 17,19, 45
              TOK_SELEXPR 1, 19,19, 45
                TOK_TABLE_OR_COL 1, 19,19, 45
                  id 1, 19,19, 45
        . 1, 10,12, 30
          TOK_TABLE_OR_COL 1, 10,10, 26
            emp4 1, 10,10, 26
          id 1, 12,12, 31

scala.NotImplementedError: No parse rules for ASTNode type: 864, text: TOK_SUBQUERY_EXPR :
TOK_SUBQUERY_EXPR 1, 10,24, 34
  TOK_SUBQUERY_OP 1, 14,14, 34
    IN 1, 14,14, 34
  TOK_QUERY 1, 16,24, 53
    TOK_FROM 1, 21,23, 53
      TOK_TABREF 1, 23,23, 53
        TOK_TABNAME 1, 23,23, 53
          emp5 1, 23,23, 53
    TOK_INSERT 0, -1,19, 0
      TOK_DESTINATION 0, -1,-1, 0
        TOK_DIR 0, -1,-1, 0
          TOK_TMP_FILE 0, -1,-1, 0
      TOK_SELECT 1, 17,19, 45
        TOK_SELEXPR 1, 19,19, 45
          TOK_TABLE_OR_COL 1, 19,19, 45
            id 1, 19,19, 45
  . 1, 10,12, 30
    TOK_TABLE_OR_COL 1, 10,10, 26
      emp4 1, 10,10, 26
    id 1, 12,12, 31
" +
         
org.apache.spark.sql.hive.HiveQl$.nodeToExpr(HiveQl.scala:1721)
          ; (state=,code=0)

Please confirm is it Carbon Data bug or Spark one.