Uploaded image for project: 'Kudu'
  1. Kudu
  2. KUDU-1320

Timestamp datatype gives error - If we create table from Impala-shell

    XMLWordPrintableJSON

Details

    Description

      Hi,

      I'm facing an issue with Timestamp datatype.

      1. If I create the kudu table from Impala shell as per below;

      CREATE EXTERNAL TABLE `kudu_test_issue` (
      `key` timestamp,
      `col2` STRING
      )
      TBLPROPERTIES(
      'storage_handler' = 'com.cloudera.kudu.hive.KuduStorageHandler',
      'kudu.table_name' = 'kudu_test_issue',
      'kudu.master_addresses' = 'cluster:7051',
      'kudu.key_columns' = 'key'
      );

      It gives me below ERROR;

      ImpalaRuntimeException: Type TIMESTAMP is not supported in Kudu

      2. If I create the table using java code as per below;

      KuduClient client = new KuduClient.KuduClientBuilder("cluster").build();

      List<ColumnSchema> columns = new ArrayList(2);
      columns.add(new ColumnSchema.ColumnSchemaBuilder("key", Type.TIMESTAMP)
      .key(true)
      .build());
      columns.add(new ColumnSchema.ColumnSchemaBuilder("col2", Type.STRING)
      .build());
      Schema schema = new Schema(columns);
      client.createTable("kudu_test_issue", schema);

      then is creates the table, but then this does not solves the problem as I can not run the ad-hoc queries on that table from Impala-shell.
      Also, under PartialRow I cannot find the timestamp related datatype to add the value.

      Please let me know, how can I solve this problem or if I'm doing it wrong.

      Attachments

        Activity

          People

            Unassigned Unassigned
            amit.adhau Amit Adhau
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: