MCPcopy Create free account
hub / github.com/apache/arrow / TEST_F

Function TEST_F

cpp/src/arrow/flight/sql/odbc/tests/statement_test.cc:355–386  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

353}
354
355TEST_F(StatementRemoteTest, TestSQLExecDirectTimeQuery) {
356 // Mock server test is skipped due to limitation on the mock server.
357 // Time type from mock server does not include the fraction
358
359 ASSIGN_SQLWCHAR_ARR_AND_LEN(wsql,
360 LR"(
361 SELECT CAST(TIME '00:00:00' AS TIME) AS time_min,
362 CAST(TIME '23:59:59' AS TIME) AS time_max;
363 )");
364
365 ASSERT_EQ(SQL_SUCCESS, SQLExecDirect(this->stmt, wsql, wsql_len));
366
367 ASSERT_EQ(SQL_SUCCESS, SQLFetch(this->stmt));
368
369 SQL_TIME_STRUCT time_var{};
370 SQLLEN buf_len = sizeof(time_var);
371 SQLLEN ind;
372
373 ASSERT_EQ(SQL_SUCCESS,
374 SQLGetData(this->stmt, 1, SQL_C_TYPE_TIME, &time_var, buf_len, &ind));
375 // Check min values for time.
376 EXPECT_EQ(0, time_var.hour);
377 EXPECT_EQ(0, time_var.minute);
378 EXPECT_EQ(0, time_var.second);
379
380 ASSERT_EQ(SQL_SUCCESS,
381 SQLGetData(this->stmt, 2, SQL_C_TYPE_TIME, &time_var, buf_len, &ind));
382 // Check max values for time.
383 EXPECT_EQ(23, time_var.hour);
384 EXPECT_EQ(59, time_var.minute);
385 EXPECT_EQ(59, time_var.second);
386}
387
388TEST_F(StatementMockTest, TestSQLExecDirectVarbinaryQuery) {
389 // Have binary test on mock test base as remote test servers tend to have different

Callers

nothing calls this directly

Calls 11

GetSqlWCharSizeFunction · 0.85
VerifyOdbcErrorStateFunction · 0.85
GetQueryAllDataTypesMethod · 0.80
SQLExecDirectFunction · 0.50
SQLFetchFunction · 0.50
SQLGetDataFunction · 0.50
SQLBindColFunction · 0.50
SQLExtendedFetchFunction · 0.50
sizeMethod · 0.45
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected