Skip to content

useKernel = true, can not get real error #445

Description

@anson-ng-appier

hi owner
we found

  const connectOptions: DatabricksConnectOptions = {
    authType: 'databricks-oauth',
    host: dbConfig.host,
    path: dbConfig.httpPath,
    oauthClientId: dbConfig.clientId,
    oauthClientSecret: dbConfig.clientSecret,
    useKernel: true
  }
  const _client = new DBSQLClient()
  await _client.connect(connectOptions)
  const session = await _client.openSession()
  const sql = `SELECT try_cast('' as ARRAY<STRING>)`
  const op = await session.executeStatement(sql)
  await op.finished()


will throw 
DriverError: kernel backend: unknown error
    at decodeNapiKernelError (...) {stack: 'Error: kernel backend: unknown error
    )', message: 'kernel backend: unknown error'}

if useKernel: false , will get real error


    [DATATYPE_MISMATCH.CAST_WITHOUT_SUGGESTION] Cannot resolve "" due to data type mismatch: cannot cast "STRING" to "ARRAY<STRING>". SQLSTATE: 42K09; line 1 pos 7

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions