Skip to content

Commit

Permalink
Merge branch 'prestodb:master' into okie-fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Mariamalmesfer authored Jan 7, 2025
2 parents 666d1cc + 7913aa4 commit 1ed5d8a
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 10 deletions.
1 change: 1 addition & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -478,6 +478,7 @@ We use the [Fork and Pull model](https://docs.github.com/en/pull-requests/collab
* Ask reviewers to provide examples or code references without trying to find them on your own
* Protest lack of documentation for a code section
* Instead, review the related code, then draft initial documentation as a separate commit
* Use AI tools to generate documentation
* Submit without test cases or clear justification for lack thereof
* Request review when there are tests failing

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -339,10 +339,12 @@ public void testView()
assertUpdate(session, "CREATE VIEW view_orders AS SELECT * from orders");
assertQuery(session, "SELECT * FROM view_orders", "SELECT * from orders");
assertThat(computeActual("SHOW CREATE VIEW view_orders").getOnlyValue())
.isEqualTo(format("CREATE VIEW iceberg.\"%s\".view_orders AS\n" +
"SELECT *\n" +
"FROM\n" +
" orders", schemaName));
.isEqualTo(format("CREATE VIEW iceberg.\"%s\".view_orders SECURITY %s AS\n" +
"SELECT *\n" +
"FROM\n" +
" orders",
schemaName,
"DEFINER"));
assertUpdate(session, "DROP VIEW view_orders");
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -472,7 +472,8 @@ protected Node visitShowCreate(ShowCreate node, Void context)
}

Query query = parseView(viewDefinition.get().getOriginalSql(), objectName, node);
String sql = formatSql(new CreateView(createQualifiedName(objectName), query, false, Optional.empty()), Optional.of(parameters)).trim();
CreateView.Security security = (viewDefinition.get().isRunAsInvoker()) ? CreateView.Security.INVOKER : CreateView.Security.DEFINER;
String sql = formatSql(new CreateView(createQualifiedName(objectName), query, false, Optional.of(security)), Optional.of(parameters)).trim();
return singleValueQuery("Create View", sql);
}

Expand Down
2 changes: 1 addition & 1 deletion presto-native-execution/velox
Submodule velox updated 69 files
+3 −3 .github/workflows/benchmark.yml
+8 −8 .github/workflows/build_pyvelox.yml
+2 −2 .github/workflows/experimental.yml
+2 −2 .github/workflows/linux-build-base.yml
+1 −1 .github/workflows/macos.yml
+7 −7 .github/workflows/scheduled.yml
+145 −0 velox/common/base/SortingNetwork.h
+8 −0 velox/common/base/benchmarks/CMakeLists.txt
+134 −0 velox/common/base/benchmarks/SortingNetworkBenchmark.cpp
+7 −2 velox/common/file/FileSystems.cpp
+6 −1 velox/common/file/FileSystems.h
+5 −0 velox/common/file/tests/FaultyFileSystem.cpp
+3 −1 velox/common/file/tests/FaultyFileSystem.h
+9 −0 velox/common/file/tests/FileTest.cpp
+1 −0 velox/connectors/hive/CMakeLists.txt
+4 −1 velox/connectors/hive/HiveConnectorUtil.cpp
+48 −5 velox/connectors/hive/storage_adapters/abfs/AbfsConfig.cpp
+16 −1 velox/connectors/hive/storage_adapters/abfs/AbfsConfig.h
+2 −34 velox/connectors/hive/storage_adapters/abfs/AbfsWriteFile.cpp
+2 −0 velox/connectors/hive/storage_adapters/abfs/AzureDataLakeFileClient.h
+18 −1 velox/connectors/hive/storage_adapters/abfs/RegisterAbfsFileSystem.cpp
+2 −2 velox/connectors/hive/storage_adapters/abfs/tests/AbfsCommonTest.cpp
+27 −0 velox/connectors/hive/storage_adapters/abfs/tests/AbfsFileSystemTest.cpp
+4 −0 velox/connectors/hive/storage_adapters/abfs/tests/MockDataLakeFileClient.h
+68 −47 velox/connectors/hive/storage_adapters/hdfs/tests/HdfsFileSystemTest.cpp
+13 −6 velox/connectors/hive/storage_adapters/hdfs/tests/HdfsMiniCluster.cpp
+16 −3 velox/connectors/hive/storage_adapters/hdfs/tests/HdfsMiniCluster.h
+7 −6 velox/connectors/hive/storage_adapters/hdfs/tests/InsertIntoHdfsTest.cpp
+1 −0 velox/dwio/CMakeLists.txt
+23 −0 velox/dwio/text/CMakeLists.txt
+29 −0 velox/dwio/text/RegisterTextWriter.cpp
+25 −0 velox/dwio/text/RegisterTextWriter.h
+26 −0 velox/dwio/text/tests/CMakeLists.txt
+75 −0 velox/dwio/text/tests/writer/BufferedWriterSinkTest.cpp
+32 −0 velox/dwio/text/tests/writer/CMakeLists.txt
+58 −0 velox/dwio/text/tests/writer/FileReaderUtil.cpp
+25 −0 velox/dwio/text/tests/writer/FileReaderUtil.h
+178 −0 velox/dwio/text/tests/writer/TextWriterTest.cpp
+85 −0 velox/dwio/text/writer/BufferedWriterSink.cpp
+55 −0 velox/dwio/text/writer/BufferedWriterSink.h
+24 −0 velox/dwio/text/writer/CMakeLists.txt
+207 −0 velox/dwio/text/writer/TextWriter.cpp
+102 −0 velox/dwio/text/writer/TextWriter.h
+2 −2 velox/exec/AggregateCompanionAdapter.cpp
+4 −4 velox/exec/AggregateCompanionAdapter.h
+4 −4 velox/exec/AggregateCompanionSignatures.cpp
+7 −7 velox/exec/AggregateCompanionSignatures.h
+4 −2 velox/exec/fuzzer/MemoryArbitrationFuzzer.cpp
+16 −0 velox/exec/fuzzer/ToSQLUtil.cpp
+3 −0 velox/exec/fuzzer/ToSQLUtil.h
+5 −0 velox/exec/tests/SqlTest.cpp
+5 −0 velox/expression/fuzzer/ExpressionFuzzerVerifier.cpp
+2 −25 velox/functions/lib/Utf8Utils.cpp
+6 −2 velox/functions/lib/Utf8Utils.h
+11 −11 velox/functions/lib/aggregates/tests/utils/AggregationTestBase.cpp
+0 −11 velox/functions/lib/tests/Utf8Test.cpp
+250 −172 velox/functions/prestosql/JsonFunctions.cpp
+1 −1 velox/functions/prestosql/json/CMakeLists.txt
+139 −66 velox/functions/prestosql/json/JsonStringUtil.cpp
+39 −10 velox/functions/prestosql/json/JsonStringUtil.h
+1 −3 velox/functions/prestosql/tests/JsonFunctionsTest.cpp
+2 −2 velox/functions/prestosql/types/JsonType.cpp
+4 −4 velox/functions/sparksql/specialforms/SparkCastExpr.cpp
+9 −12 velox/functions/sparksql/specialforms/SparkCastHooks.cpp
+20 −4 velox/functions/sparksql/specialforms/SparkCastHooks.h
+56 −0 velox/functions/sparksql/tests/SparkCastExprTest.cpp
+205 −0 velox/parse/DuckLogicalOperator.h
+471 −19 velox/parse/QueryPlanner.cpp
+15 −0 velox/parse/QueryPlanner.h
Original file line number Diff line number Diff line change
Expand Up @@ -583,8 +583,7 @@ protected Void visitCreateView(CreateView node, Integer indent)

node.getSecurity().ifPresent(security ->
builder.append(" SECURITY ")
.append(security.toString())
.append(" "));
.append(security.toString()));

builder.append(" AS\n");

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1202,7 +1202,7 @@ public void testCreateAlterTable()
public void testCreateDropView()
{
// create table with default format orc
String createViewSql = "CREATE VIEW hive.hive_test.hive_view AS\n" +
String createViewSql = "CREATE VIEW hive.hive_test.hive_view SECURITY DEFINER AS\n" +
"SELECT *\n" +
"FROM\n" +
" orders";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -968,10 +968,11 @@ public void testViewMetadata()

// test SHOW CREATE VIEW
String expectedSql = formatSqlText(format(
"CREATE VIEW %s.%s.%s AS %s",
"CREATE VIEW %s.%s.%s SECURITY %s AS %s",
getSession().getCatalog().get(),
getSession().getSchema().get(),
"meta_test_view",
"DEFINER",
query)).trim();

actual = computeActual("SHOW CREATE VIEW meta_test_view");
Expand Down

0 comments on commit 1ed5d8a

Please sign in to comment.