Skip to content

Conversation

@hoophalab
Copy link
Contributor

@hoophalab hoophalab commented Jul 25, 2025

Description

  1. Adds route for Presto search queries.
  2. Submits Presto search queries on 'Run' button click.
  3. Currently, the search results are printed to the server console. They need to be pushed to mongdo db in future PRs.

@davemarco, after experimenting with presto-client-node, I feel we'll still need a PrestoSearchManager for handling cancel requests.

Also, we are probably going to store presto query's states in server's memory, which doesn't sound good.

Checklist

  • The PR satisfies the contribution guidelines.
  • This is a breaking change and that has been indicated in the PR title, OR this isn't a
    breaking change.
  • Necessary docs have been updated, OR no docs need to be updated.

Validation performed

  1. Executed SELECT * FROM tpch.sf100.customer limit 10 in the Presto search webui and verified that the data appeared correctly in the server's console.

  2. Executed SELECT * FROM tpch.sf100.customer and verified that the data streamed as intended to the server's console.

Summary by CodeRabbit

  • New Features

    • Added support for submitting Presto SQL queries from the user interface.
    • Introduced configuration options for connecting to a Presto server.
    • Users can now execute queries using a dedicated "Run" button in the Presto search controls.
  • Chores

    • Updated server dependencies to include Presto client libraries and cleaned up duplicate entries.
    • Added new API endpoints and schemas to facilitate Presto query submission and job tracking.

@hoophalab hoophalab requested a review from a team as a code owner July 25, 2025 20:39
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jul 25, 2025

Walkthrough

This change introduces backend and frontend support for submitting Presto SQL queries. It adds a Fastify plugin for Presto integration, API routes and schemas for query submission, client-side request handlers, and updates the Presto RunButton to trigger query submission. Configuration and dependency updates for Presto connectivity are also included.

Changes

Cohort / File(s) Change Summary
Presto Client Integration (Server Plugin)
components/webui/server/src/plugins/app/Presto.ts
Adds a Fastify plugin and Presto class for Presto client integration, conditionally decorating the Fastify instance based on configuration.
Presto Query API Route
components/webui/server/src/routes/api/presto-search/index.ts
Introduces a POST /query API endpoint for submitting Presto queries, handling execution and returning a job ID.
Presto Query Schemas (Server)
components/webui/server/src/schemas/presto-search.ts
Defines and exports JSON schemas for Presto query job creation and job ID response.
Presto Query API (Client)
components/webui/client/src/api/presto-search/index.ts
Adds type definitions and a submitQuery function to send Presto query requests from the client to the backend API.
Presto Query Request Handler (Client)
components/webui/client/src/pages/SearchPage/SearchControls/Presto/presto-search-requests.ts
Adds handlePrestoQuerySubmit function to handle Presto query submission from the UI, with logging for success and error cases.
Presto RunButton Click Handler
components/webui/client/src/pages/SearchPage/SearchControls/Presto/RunButton/index.tsx
Updates the RunButton to use a memoized click handler that calls handlePrestoQuerySubmit with the current query string.
Server Configuration
components/webui/server/settings.json
Adds configuration keys for Presto engine type, host, and port.
Server Dependencies
components/webui/server/package.json
Adds presto-client and its TypeScript types, removes duplicate @fastify/http-proxy entry.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant RunButton (UI)
    participant Client Handler
    participant API Server
    participant Presto Plugin
    participant Presto Server

    User->>RunButton (UI): Click "Run"
    RunButton (UI)->>Client Handler: handlePrestoQuerySubmit(queryString)
    Client Handler->>API Server: POST /api/presto-search/query {queryString}
    API Server->>Presto Plugin: Execute queryString via Presto client
    Presto Plugin->>Presto Server: Submit query
    Presto Server-->>Presto Plugin: Respond with job ID/state
    Presto Plugin-->>API Server: Return searchJobId
    API Server-->>Client Handler: {searchJobId}
    Client Handler-->>RunButton (UI): Log/notify job creation
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~15–20 minutes

Possibly related PRs

Suggested reviewers

  • hoophalab
  • junhaoliao

Note

⚡️ Unit Test Generation is now available in beta!

Learn more here, or try it out under "Finishing Touches" below.


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 879941e and b2c8614.

📒 Files selected for processing (4)
  • components/webui/client/src/api/presto-search/index.ts (1 hunks)
  • components/webui/client/src/pages/SearchPage/SearchControls/Presto/presto-search-requests.ts (1 hunks)
  • components/webui/server/settings.json (1 hunks)
  • components/webui/server/src/routes/api/presto-search/index.ts (1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
**/*.{cpp,hpp,java,js,jsx,tpp,ts,tsx}

⚙️ CodeRabbit Configuration File

  • Prefer false == <expression> rather than !<expression>.

Files:

  • components/webui/client/src/pages/SearchPage/SearchControls/Presto/presto-search-requests.ts
  • components/webui/server/src/routes/api/presto-search/index.ts
  • components/webui/client/src/api/presto-search/index.ts
🧠 Learnings (9)
📓 Common learnings
Learnt from: haiqi96
PR: y-scope/clp#0
File: :0-0
Timestamp: 2025-07-29T14:04:13.769Z
Learning: User haiqi96 requested creating a GitHub issue to document a bug fix from PR #1136, which addressed MySQL compatibility issues with invalid SQL CAST operations in the WebUI component.
Learnt from: junhaoliao
PR: y-scope/clp#596
File: components/log-viewer-webui/client/src/api/query.js:16-23
Timestamp: 2024-11-21T15:51:33.203Z
Learning: In `components/log-viewer-webui/client/src/api/query.js`, the `ExtractJsonResp` type definition is accurate as-is and does not require modification. When suggesting changes to type definitions, ensure they align with the server-side definitions, referencing the source code if necessary.
Learnt from: junhaoliao
PR: y-scope/clp#1136
File: components/webui/client/src/pages/IngestPage/Details/sql.ts:1-1
Timestamp: 2025-07-29T21:00:07.757Z
Learning: User junhaoliao requested creating a GitHub issue to track server-side SQL query error handling improvements, specifically to prevent uncaught query errors from causing 500 errors to reach the client.
Learnt from: junhaoliao
PR: y-scope/clp#939
File: components/package-template/src/etc/clp-config.yml:64-64
Timestamp: 2025-06-22T04:01:43.409Z
Learning: The new webui architecture uses Fastify with Pino logging instead of the previous Winston-based logging system that was removed during the webui refactoring.
📚 Learning: in `components/log-viewer-webui/client/src/api/query.js`, the `extractjsonresp` type definition is a...
Learnt from: junhaoliao
PR: y-scope/clp#596
File: components/log-viewer-webui/client/src/api/query.js:16-23
Timestamp: 2024-11-21T15:51:33.203Z
Learning: In `components/log-viewer-webui/client/src/api/query.js`, the `ExtractJsonResp` type definition is accurate as-is and does not require modification. When suggesting changes to type definitions, ensure they align with the server-side definitions, referencing the source code if necessary.

Applied to files:

  • components/webui/server/settings.json
  • components/webui/client/src/pages/SearchPage/SearchControls/Presto/presto-search-requests.ts
  • components/webui/server/src/routes/api/presto-search/index.ts
  • components/webui/client/src/api/presto-search/index.ts
📚 Learning: user haiqi96 requested creating a github issue to document a bug fix from pr #1136, which addressed ...
Learnt from: haiqi96
PR: y-scope/clp#0
File: :0-0
Timestamp: 2025-07-29T14:04:13.769Z
Learning: User haiqi96 requested creating a GitHub issue to document a bug fix from PR #1136, which addressed MySQL compatibility issues with invalid SQL CAST operations in the WebUI component.

Applied to files:

  • components/webui/server/settings.json
📚 Learning: user junhaoliao requested creating a github issue to track server-side sql query error handling impr...
Learnt from: junhaoliao
PR: y-scope/clp#1136
File: components/webui/client/src/pages/IngestPage/Details/sql.ts:1-1
Timestamp: 2025-07-29T21:00:07.757Z
Learning: User junhaoliao requested creating a GitHub issue to track server-side SQL query error handling improvements, specifically to prevent uncaught query errors from causing 500 errors to reach the client.

Applied to files:

  • components/webui/client/src/pages/SearchPage/SearchControls/Presto/presto-search-requests.ts
  • components/webui/server/src/routes/api/presto-search/index.ts
📚 Learning: in components/log-viewer-webui/server/src/routes/static.ts, when decoratereply is set to true in fas...
Learnt from: davemarco
PR: y-scope/clp#1015
File: components/log-viewer-webui/server/src/routes/static.ts:65-70
Timestamp: 2025-06-16T13:05:27.349Z
Learning: In components/log-viewer-webui/server/src/routes/static.ts, when decorateReply is set to true in fastifyStatic configuration, the reply.sendFile() method automatically uses the root directory configured in the static plugin registration, eliminating the need to pass the root directory as a second parameter.

Applied to files:

  • components/webui/server/src/routes/api/presto-search/index.ts
📚 Learning: the new webui architecture uses fastify with pino logging instead of the previous winston-based logg...
Learnt from: junhaoliao
PR: y-scope/clp#939
File: components/package-template/src/etc/clp-config.yml:64-64
Timestamp: 2025-06-22T04:01:43.409Z
Learning: The new webui architecture uses Fastify with Pino logging instead of the previous Winston-based logging system that was removed during the webui refactoring.

Applied to files:

  • components/webui/server/src/routes/api/presto-search/index.ts
📚 Learning: do not suggest modifications to auto-generated code files, even for minor issues like duplicate decl...
Learnt from: anlowee
PR: y-scope/clp#925
File: components/core/src/clp_s/search/kql/antlr_generated/KqlLexer.cpp:8-13
Timestamp: 2025-05-26T18:41:26.096Z
Learning: Do not suggest modifications to auto-generated code files, even for minor issues like duplicate declarations or formatting inconsistencies.

Applied to files:

  • components/webui/server/src/routes/api/presto-search/index.ts
📚 Learning: when implementing socket.io namespaces or connection pooling in a client-server architecture (like t...
Learnt from: davemarco
PR: y-scope/clp#892
File: components/log-viewer-webui/client/src/api/socket/MongoCollectionSocket.ts:32-38
Timestamp: 2025-05-09T18:05:42.814Z
Learning: When implementing Socket.IO namespaces or connection pooling in a client-server architecture (like the MongoDB collection socket system in the log-viewer-webui), coordinated changes are needed on both client and server sides, making it appropriate to track as a TODO rather than implement piecemeal.

Applied to files:

  • components/webui/server/src/routes/api/presto-search/index.ts
📚 Learning: for internal apis in `components/log-viewer-webui/client/src/api/query.js`, runtime validation of pa...
Learnt from: junhaoliao
PR: y-scope/clp#596
File: components/log-viewer-webui/client/src/api/query.js:35-41
Timestamp: 2024-11-19T19:52:43.429Z
Learning: For internal APIs in `components/log-viewer-webui/client/src/api/query.js`, runtime validation of parameters may not be necessary since the APIs are not exposed to end users, and JsDoc type annotations may be sufficient.

Applied to files:

  • components/webui/server/src/routes/api/presto-search/index.ts
🧬 Code Graph Analysis (1)
components/webui/client/src/pages/SearchPage/SearchControls/Presto/presto-search-requests.ts (2)
components/webui/client/src/api/presto-search/index.ts (2)
  • PrestoQueryJobCreationSchema (32-32)
  • submitQuery (36-36)
components/webui/server/src/schemas/presto-search.ts (1)
  • PrestoQueryJobCreationSchema (21-21)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: lint-check (macos-15)
🔇 Additional comments (2)
components/webui/server/settings.json (1)

21-23: LGTM! Configuration structure supports the new Presto integration.

The addition of ClpQueryEngine, PrestoHost, and PrestoPort provides the necessary configuration for the Presto client integration. The port change to 8889 addresses the previous feedback about avoiding conflicts with the docs server on 8080.

components/webui/client/src/api/presto-search/index.ts (1)

1-36: LGTM! Clean API client implementation.

The client-side API implementation is well-structured with proper typing, async handling, and clear documentation. The temporary type duplication is appropriately documented in the TODO comment and planned for future refactoring.

✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai generate unit tests to generate unit tests for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@hoophalab hoophalab changed the title feat(webui): Add request for Presto search to webui. feat(webui): Add support for submitting Presto SQL queries. Jul 25, 2025
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 7

📜 Review details

Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between ebb637b and fbc0fb4.

⛔ Files ignored due to path filters (1)
  • components/webui/server/package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (6)
  • components/webui/client/src/api/presto-search.ts (1 hunks)
  • components/webui/client/src/pages/SearchPage/SearchControls/Presto/RunButton/index.tsx (3 hunks)
  • components/webui/server/package.json (2 hunks)
  • components/webui/server/settings.json (1 hunks)
  • components/webui/server/src/routes/api/presto-search/index.ts (1 hunks)
  • components/webui/server/src/schemas/presto-search.ts (1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
**/*.{cpp,hpp,java,js,jsx,tpp,ts,tsx}

⚙️ CodeRabbit Configuration File

  • Prefer false == <expression> rather than !<expression>.

Files:

  • components/webui/client/src/pages/SearchPage/SearchControls/Presto/RunButton/index.tsx
  • components/webui/server/src/schemas/presto-search.ts
  • components/webui/client/src/api/presto-search.ts
  • components/webui/server/src/routes/api/presto-search/index.ts
🧠 Learnings (5)
📓 Common learnings
Learnt from: junhaoliao
PR: y-scope/clp#596
File: components/log-viewer-webui/client/src/api/query.js:16-23
Timestamp: 2024-11-21T15:51:33.203Z
Learning: In `components/log-viewer-webui/client/src/api/query.js`, the `ExtractJsonResp` type definition is accurate as-is and does not require modification. When suggesting changes to type definitions, ensure they align with the server-side definitions, referencing the source code if necessary.
components/webui/server/package.json (2)

Learnt from: junhaoliao
PR: #939
File: components/package-template/src/etc/clp-config.yml:64-64
Timestamp: 2025-06-22T04:01:43.409Z
Learning: The new webui architecture uses Fastify with Pino logging instead of the previous Winston-based logging system that was removed during the webui refactoring.

Learnt from: junhaoliao
PR: #596
File: components/log-viewer-webui/client/src/api/query.js:16-23
Timestamp: 2024-11-21T15:51:33.203Z
Learning: In components/log-viewer-webui/client/src/api/query.js, the ExtractJsonResp type definition is accurate as-is and does not require modification. When suggesting changes to type definitions, ensure they align with the server-side definitions, referencing the source code if necessary.

components/webui/server/src/schemas/presto-search.ts (1)

Learnt from: junhaoliao
PR: #596
File: components/log-viewer-webui/client/src/api/query.js:16-23
Timestamp: 2024-11-21T15:51:33.203Z
Learning: In components/log-viewer-webui/client/src/api/query.js, the ExtractJsonResp type definition is accurate as-is and does not require modification. When suggesting changes to type definitions, ensure they align with the server-side definitions, referencing the source code if necessary.

components/webui/client/src/api/presto-search.ts (1)

Learnt from: junhaoliao
PR: #596
File: components/log-viewer-webui/client/src/api/query.js:16-23
Timestamp: 2024-11-21T15:51:33.203Z
Learning: In components/log-viewer-webui/client/src/api/query.js, the ExtractJsonResp type definition is accurate as-is and does not require modification. When suggesting changes to type definitions, ensure they align with the server-side definitions, referencing the source code if necessary.

components/webui/server/src/routes/api/presto-search/index.ts (2)

Learnt from: junhaoliao
PR: #596
File: components/log-viewer-webui/client/src/api/query.js:16-23
Timestamp: 2024-11-21T15:51:33.203Z
Learning: In components/log-viewer-webui/client/src/api/query.js, the ExtractJsonResp type definition is accurate as-is and does not require modification. When suggesting changes to type definitions, ensure they align with the server-side definitions, referencing the source code if necessary.

Learnt from: junhaoliao
PR: #939
File: components/package-template/src/etc/clp-config.yml:64-64
Timestamp: 2025-06-22T04:01:43.409Z
Learning: The new webui architecture uses Fastify with Pino logging instead of the previous Winston-based logging system that was removed during the webui refactoring.

🔇 Additional comments (6)
components/webui/server/src/schemas/presto-search.ts (1)

1-21: LGTM! Well-structured schema definitions.

The schema definitions are clean, well-organized, and follow TypeBox conventions. The separation of concerns between job creation and job response schemas is appropriate.

components/webui/server/package.json (1)

41-41: Verified Presto Client dependency versions and security

  • components/webui/server/package.json (lines 41 & 46):
    • presto-client@^1.1.0 and @types/presto-client@^1.0.2 are the latest stable releases.
  • No known security vulnerabilities have been reported for either package.
  • Note: presto-client was last updated Jan 2024 and @types/presto-client Sep 2024; it’s advisable to monitor for future updates.

No further changes required.

components/webui/client/src/pages/SearchPage/SearchControls/Presto/RunButton/index.tsx (1)

26-35: LGTM! Good implementation with proper async handling.

The click handler is well-implemented with proper memoization, error handling, and state management. The use of useCallback with the correct dependency array prevents unnecessary re-renders.

components/webui/client/src/api/presto-search.ts (1)

38-41: LGTM! Good API design with proper validation.

The submitQuery function is well-implemented with proper TypeScript typing and response validation using TypeBox. The use of Value.Parse ensures runtime type safety.

components/webui/server/src/routes/api/presto-search/index.ts (2)

1-12: Imports are well-organized and appropriate.

The imports are properly structured with external dependencies first, followed by local imports. The JSON import assertion for settings is correctly implemented.


78-85: Consider the implications of returning immediately after receiving the job ID.

The current implementation returns the search job ID as soon as the state callback is invoked, without waiting for the query to complete. This might be intentional for async job submission, but it's worth documenting this behavior clearly.

If this is the intended behavior, consider adding a comment to clarify:

                     state: (error, newSearchJobId, stats) => {
                         request.log.info({
                             error: error,
                             searchJobId: newSearchJobId,
                             state: stats.state,
                         }, "Presto search state updated");
 
+                        // Return the job ID immediately for async tracking
                         resolve(newSearchJobId);
                     },

Comment on lines 19 to 25
const plugin: FastifyPluginAsyncTypebox = async (fastify) => {
if (false === settings.EnablePresto) {
return;
}

const client = new Client({host: settings.PrestoHost, port: settings.PrestoPort});

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Add validation for Presto configuration settings.

The code should validate that PrestoHost and PrestoPort are properly configured before creating the client. Consider adding checks to ensure these settings exist and are valid.

 const plugin: FastifyPluginAsyncTypebox = async (fastify) => {
     if (false === settings.EnablePresto) {
         return;
     }
 
+    if (!settings.PrestoHost || !settings.PrestoPort) {
+        throw new Error("Presto is enabled but PrestoHost or PrestoPort is not configured");
+    }
+
     const client = new Client({host: settings.PrestoHost, port: settings.PrestoPort});
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
const plugin: FastifyPluginAsyncTypebox = async (fastify) => {
if (false === settings.EnablePresto) {
return;
}
const client = new Client({host: settings.PrestoHost, port: settings.PrestoPort});
const plugin: FastifyPluginAsyncTypebox = async (fastify) => {
if (false === settings.EnablePresto) {
return;
}
if (!settings.PrestoHost || !settings.PrestoPort) {
throw new Error("Presto is enabled but PrestoHost or PrestoPort is not configured");
}
const client = new Client({host: settings.PrestoHost, port: settings.PrestoPort});
// …rest of plugin implementation…
}
🤖 Prompt for AI Agents
In components/webui/server/src/routes/api/presto-search/index.ts around lines 19
to 25, the code creates a Presto client without validating the configuration
settings. Add validation checks to ensure that settings.PrestoHost is a
non-empty string and settings.PrestoPort is a valid number before creating the
client. If either setting is missing or invalid, log an error or return early to
prevent creating the client with invalid configuration.

Comment on lines 47 to 76
searchJobId = await new Promise((resolve) => {
client.execute({
data: (error, data, columns) => {
if (null === searchJobId) {
request.log.error("Data arrived from Presto before the search job id.");
}
request.log.info({error, searchJobId, columns, data}, "Presto data");
},
error: (error) => {
request.log.info(error, "Presto search failed");

// The `/query` endpoint will catch this error if `resolve` hasn't
// been called.
throw new Error("Presto search failed.");
},
query: queryString,
state: (error, newSearchJobId, stats) => {
request.log.info({
error: error,
searchJobId: newSearchJobId,
state: stats.state,
}, "Presto search state updated");

resolve(newSearchJobId);
},
success: () => {
request.log.info("Presto search succeeded");
},
});
});
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Critical: Improve error handling and async flow in Presto callbacks.

The current implementation has several issues:

  1. The error thrown in the error callback (line 60) won't be caught by the Promise
  2. The Promise resolves immediately when state is updated, not when the query completes
  3. No handling for the case where the query completes without calling the state callback

Consider refactoring to properly handle all callback scenarios:

-            searchJobId = await new Promise((resolve) => {
+            searchJobId = await new Promise((resolve, reject) => {
                 client.execute({
                     data: (error, data, columns) => {
+                        if (error) {
+                            request.log.error({error}, "Error in data callback");
+                            return;
+                        }
                         if (null === searchJobId) {
                             request.log.error("Data arrived from Presto before the search job id.");
                         }
                         request.log.info({error, searchJobId, columns, data}, "Presto data");
                     },
                     error: (error) => {
                         request.log.info(error, "Presto search failed");
-
-                        // The `/query` endpoint will catch this error if `resolve` hasn't
-                        // been called.
-                        throw new Error("Presto search failed.");
+                        reject(new Error("Presto search failed."));
                     },
                     query: queryString,
                     state: (error, newSearchJobId, stats) => {
+                        if (error) {
+                            request.log.error({error}, "Error in state callback");
+                            reject(error);
+                            return;
+                        }
                         request.log.info({
                             error: error,
                             searchJobId: newSearchJobId,
                             state: stats.state,
                         }, "Presto search state updated");
 
-                        resolve(newSearchJobId);
+                        // Only set searchJobId once
+                        if (null === searchJobId && newSearchJobId) {
+                            searchJobId = newSearchJobId;
+                        }
+                        
+                        // Don't resolve here - wait for success or error
                     },
                     success: () => {
                         request.log.info("Presto search succeeded");
+                        resolve(searchJobId);
                     },
                 });
             });
🤖 Prompt for AI Agents
In components/webui/server/src/routes/api/presto-search/index.ts between lines
47 and 76, the Promise handling Presto client callbacks has issues: throwing an
error inside the error callback does not reject the Promise, the Promise
resolves prematurely on state update instead of query completion, and there is
no handling for query completion without state callback. To fix this, refactor
the Promise to reject on error by calling reject with the error, resolve only
when the success callback is invoked indicating query completion, and ensure all
possible callback scenarios (error, state, success) properly trigger resolve or
reject to maintain correct async flow.

@davemarco davemarco requested a review from junhaoliao July 30, 2025 14:57
Copy link
Member

@junhaoliao junhaoliao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(i haven't validated the changes) on a high level, the code lgtm

we shall see if "@prestodb/presto-js-client" can be a better choice than "presto-client" before making further changes

@junhaoliao junhaoliao requested a review from davemarco July 30, 2025 17:01
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 5

♻️ Duplicate comments (3)
components/webui/server/settings.json (1)

21-23: Address past review feedback and port conflict concern.

The configuration still uses hardcoded localhost values and port 8080, which conflicts with the commonly used docs debug server port as noted in previous reviews. The naming also differs from the suggested interface using ClpQueryEngine instead of the previously suggested approach.

Consider the following improvements:

  1. Use environment variables for flexible deployment
  2. Change the default port to avoid conflicts (e.g., 8081)
  3. Add authentication settings for production security
-    "ClpQueryEngine": "presto",
-    "PrestoHost": "localhost",
-    "PrestoPort": 8080
+    "ClpQueryEngine": "${CLP_QUERY_ENGINE:-native}",
+    "PrestoHost": "${PRESTO_HOST:-localhost}",
+    "PrestoPort": "${PRESTO_PORT:-8081}"
components/webui/server/src/routes/api/presto-search/index.ts (2)

44-78: Critical: Fix Promise handling and async flow issues.

The current Promise implementation has several critical issues that were highlighted in previous reviews:

  1. The Promise resolves immediately when state is updated, not when the query completes
  2. Error handling in callbacks doesn't properly reject the Promise
  3. No handling for successful query completion
-            searchJobId = await new Promise<string>((resolve, reject) => {
-                let isResolved = false;
+            searchJobId = await new Promise<string>((resolve, reject) => {
+                let queryId: string | null = null;
+                let isResolved = false;
 
                 Presto.client.execute({
-                    // eslint-disable-next-line no-warning-comments
-                    // TODO: Data, error, and success handlers are dummy implementations
-                    // and should be completed.
                     data: (_, data, columns) => {
+                        if (null === queryId) {
+                            request.log.error("Data arrived from Presto before the search job id.");
+                        }
                         request.log.info({columns, data}, "Presto data");
                     },
                     error: (error) => {
                         request.log.info(error, "Presto search failed");
                         if (false === isResolved) {
                             isResolved = true;
-                            reject(new Error("Presto search failed"));
+                            reject(new Error("Presto search failed"));
                         }
                     },
                     query: queryString,
                     state: (_, newQueryId, stats) => {
                         request.log.info({
-                            searchJobId: queryId,
+                            searchJobId: newQueryId,
                             state: stats.state,
                         }, "Presto search state updated");
 
-                        if (false === isResolved) {
-                            isResolved = true;
-                            resolve(queryId);
-                        }
+                        // Store query ID but don't resolve yet
+                        if (null === queryId && newQueryId) {
+                            queryId = newQueryId;
+                        }
                     },
                     success: () => {
                         request.log.info("Presto search succeeded");
+                        if (false === isResolved) {
+                            isResolved = true;
+                            if (queryId) {
+                                resolve(queryId);
+                            } else {
+                                reject(new Error("Query succeeded but no query ID received"));
+                            }
+                        }
                     },
                 });
             });

16-21: Improve error message for missing Presto client.

The error message could be more descriptive to help with debugging.

-    if ("undefined" === typeof Presto) {
-        throw new Error("Presto not available");
-    }
+    if ("undefined" === typeof Presto) {
+        throw new Error("Presto client is not available. Ensure ClpQueryEngine is set to 'presto' and Presto configuration is valid.");
+    }
📜 Review details

Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 73d41d5 and 879941e.

📒 Files selected for processing (7)
  • components/webui/client/public/settings.json (1 hunks)
  • components/webui/client/src/pages/SearchPage/SearchControls/Presto/RunButton/index.tsx (3 hunks)
  • components/webui/client/src/pages/SearchPage/SearchControls/Presto/presto-search-requests.ts (1 hunks)
  • components/webui/server/settings.json (1 hunks)
  • components/webui/server/src/plugins/app/Presto.ts (1 hunks)
  • components/webui/server/src/routes/api/presto-search/index.ts (1 hunks)
  • components/webui/server/src/schemas/presto-search.ts (1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
**/*.{cpp,hpp,java,js,jsx,tpp,ts,tsx}

⚙️ CodeRabbit Configuration File

  • Prefer false == <expression> rather than !<expression>.

Files:

  • components/webui/client/src/pages/SearchPage/SearchControls/Presto/RunButton/index.tsx
  • components/webui/client/src/pages/SearchPage/SearchControls/Presto/presto-search-requests.ts
  • components/webui/server/src/schemas/presto-search.ts
  • components/webui/server/src/routes/api/presto-search/index.ts
  • components/webui/server/src/plugins/app/Presto.ts
🧠 Learnings (11)
📓 Common learnings
Learnt from: haiqi96
PR: y-scope/clp#0
File: :0-0
Timestamp: 2025-07-29T14:04:13.769Z
Learning: User haiqi96 requested creating a GitHub issue to document a bug fix from PR #1136, which addressed MySQL compatibility issues with invalid SQL CAST operations in the WebUI component.
Learnt from: junhaoliao
PR: y-scope/clp#596
File: components/log-viewer-webui/client/src/api/query.js:16-23
Timestamp: 2024-11-21T15:51:33.203Z
Learning: In `components/log-viewer-webui/client/src/api/query.js`, the `ExtractJsonResp` type definition is accurate as-is and does not require modification. When suggesting changes to type definitions, ensure they align with the server-side definitions, referencing the source code if necessary.
Learnt from: junhaoliao
PR: y-scope/clp#1136
File: components/webui/client/src/pages/IngestPage/Details/sql.ts:1-1
Timestamp: 2025-07-29T21:00:07.757Z
Learning: User junhaoliao requested creating a GitHub issue to track server-side SQL query error handling improvements, specifically to prevent uncaught query errors from causing 500 errors to reach the client.
Learnt from: junhaoliao
PR: y-scope/clp#939
File: components/package-template/src/etc/clp-config.yml:64-64
Timestamp: 2025-06-22T04:01:43.409Z
Learning: The new webui architecture uses Fastify with Pino logging instead of the previous Winston-based logging system that was removed during the webui refactoring.
📚 Learning: in `components/log-viewer-webui/client/src/api/query.js`, the `extractjsonresp` type definition is a...
Learnt from: junhaoliao
PR: y-scope/clp#596
File: components/log-viewer-webui/client/src/api/query.js:16-23
Timestamp: 2024-11-21T15:51:33.203Z
Learning: In `components/log-viewer-webui/client/src/api/query.js`, the `ExtractJsonResp` type definition is accurate as-is and does not require modification. When suggesting changes to type definitions, ensure they align with the server-side definitions, referencing the source code if necessary.

Applied to files:

  • components/webui/client/public/settings.json
  • components/webui/server/settings.json
  • components/webui/client/src/pages/SearchPage/SearchControls/Presto/RunButton/index.tsx
  • components/webui/client/src/pages/SearchPage/SearchControls/Presto/presto-search-requests.ts
  • components/webui/server/src/schemas/presto-search.ts
  • components/webui/server/src/routes/api/presto-search/index.ts
📚 Learning: in the clp codebase, the `m_case_sensitive_search` flag is used only for actual string value compari...
Learnt from: LinZhihao-723
PR: y-scope/clp#873
File: components/core/src/clp/ffi/ir_stream/search/QueryHandlerImpl.hpp:320-324
Timestamp: 2025-05-05T01:12:18.561Z
Learning: In the CLP codebase, the `m_case_sensitive_search` flag is used only for actual string value comparisons during query evaluation, not for schema key name matching. Schema keys are always compared case-sensitively regardless of this flag's setting.

Applied to files:

  • components/webui/client/public/settings.json
📚 Learning: in the clp codebase, `table_prefix` is a trusted configuration value and can be safely embedded into...
Learnt from: haiqi96
PR: y-scope/clp#594
File: components/clp-package-utils/clp_package_utils/scripts/native/del_archives.py:90-96
Timestamp: 2024-11-15T16:22:33.635Z
Learning: In the CLP codebase, `table_prefix` is a trusted configuration value and can be safely embedded into SQL queries.

Applied to files:

  • components/webui/client/public/settings.json
📚 Learning: user haiqi96 requested creating a github issue to document a bug fix from pr #1136, which addressed ...
Learnt from: haiqi96
PR: y-scope/clp#0
File: :0-0
Timestamp: 2025-07-29T14:04:13.769Z
Learning: User haiqi96 requested creating a GitHub issue to document a bug fix from PR #1136, which addressed MySQL compatibility issues with invalid SQL CAST operations in the WebUI component.

Applied to files:

  • components/webui/server/settings.json
📚 Learning: user junhaoliao requested creating a github issue to track server-side sql query error handling impr...
Learnt from: junhaoliao
PR: y-scope/clp#1136
File: components/webui/client/src/pages/IngestPage/Details/sql.ts:1-1
Timestamp: 2025-07-29T21:00:07.757Z
Learning: User junhaoliao requested creating a GitHub issue to track server-side SQL query error handling improvements, specifically to prevent uncaught query errors from causing 500 errors to reach the client.

Applied to files:

  • components/webui/client/src/pages/SearchPage/SearchControls/Presto/RunButton/index.tsx
  • components/webui/server/src/routes/api/presto-search/index.ts
📚 Learning: for internal apis in `components/log-viewer-webui/client/src/api/query.js`, runtime validation of pa...
Learnt from: junhaoliao
PR: y-scope/clp#596
File: components/log-viewer-webui/client/src/api/query.js:35-41
Timestamp: 2024-11-19T19:52:43.429Z
Learning: For internal APIs in `components/log-viewer-webui/client/src/api/query.js`, runtime validation of parameters may not be necessary since the APIs are not exposed to end users, and JsDoc type annotations may be sufficient.

Applied to files:

  • components/webui/client/src/pages/SearchPage/SearchControls/Presto/RunButton/index.tsx
📚 Learning: in the y-scope/clp react webui client codebase, for zustand store usage: use `usestore.getstate().me...
Learnt from: hoophalab
PR: y-scope/clp#1108
File: components/webui/client/src/pages/SearchPage/SearchControls/Presto/SqlQueryInput/index.tsx:15-15
Timestamp: 2025-07-18T20:00:50.288Z
Learning: In the y-scope/clp React webui client codebase, for Zustand store usage: use `useStore.getState().method` for callbacks since the output is not reactive and doesn't need state as a dependency in the hook, and use `useStore((state) => state.property)` with proper selectors for reactive components that need to re-render when state changes.

Applied to files:

  • components/webui/client/src/pages/SearchPage/SearchControls/Presto/RunButton/index.tsx
📚 Learning: the new webui architecture uses fastify with pino logging instead of the previous winston-based logg...
Learnt from: junhaoliao
PR: y-scope/clp#939
File: components/package-template/src/etc/clp-config.yml:64-64
Timestamp: 2025-06-22T04:01:43.409Z
Learning: The new webui architecture uses Fastify with Pino logging instead of the previous Winston-based logging system that was removed during the webui refactoring.

Applied to files:

  • components/webui/server/src/routes/api/presto-search/index.ts
  • components/webui/server/src/plugins/app/Presto.ts
📚 Learning: in components/log-viewer-webui/server/src/routes/static.ts, when decoratereply is set to true in fas...
Learnt from: davemarco
PR: y-scope/clp#1015
File: components/log-viewer-webui/server/src/routes/static.ts:65-70
Timestamp: 2025-06-16T13:05:27.349Z
Learning: In components/log-viewer-webui/server/src/routes/static.ts, when decorateReply is set to true in fastifyStatic configuration, the reply.sendFile() method automatically uses the root directory configured in the static plugin registration, eliminating the need to pass the root directory as a second parameter.

Applied to files:

  • components/webui/server/src/routes/api/presto-search/index.ts
📚 Learning: do not suggest modifications to auto-generated code files, even for minor issues like duplicate decl...
Learnt from: anlowee
PR: y-scope/clp#925
File: components/core/src/clp_s/search/kql/antlr_generated/KqlLexer.cpp:8-13
Timestamp: 2025-05-26T18:41:26.096Z
Learning: Do not suggest modifications to auto-generated code files, even for minor issues like duplicate declarations or formatting inconsistencies.

Applied to files:

  • components/webui/server/src/routes/api/presto-search/index.ts
🪛 GitHub Actions: clp-lint
components/webui/client/src/pages/SearchPage/SearchControls/Presto/presto-search-requests.ts

[error] 1-26: ESLint errors: Unable to resolve path to module '../../../../api/presto-search' (import/no-unresolved); duplicated import '../../../../api/presto-search' (no-duplicate-imports); expected 2 empty lines after import statement (import/newline-after-import); unsafe calls and member accesses on 'error' typed values (@typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-member-access); unsafe assignment of 'any' value (@typescript-eslint/no-unsafe-assignment); unexpected line breaks in object curly braces (@stylistic/object-curly-newline). 12 errors total.


[warning] 1-1: ESLint warning: Run autofix to sort these imports! (simple-import-sort/imports)

🔇 Additional comments (12)
components/webui/client/public/settings.json (1)

3-3: LGTM! Configuration aligns with server-side changes.

The change to set ClpQueryEngine to "presto" correctly aligns the client configuration with the server-side Presto integration.

components/webui/client/src/pages/SearchPage/SearchControls/Presto/RunButton/index.tsx (4)

1-1: LGTM! Clean import addition.

The useCallback import is correctly added for the memoized click handler.


10-10: LGTM! Proper import of the query submission handler.

The import of handlePrestoQuerySubmit correctly integrates the button with the Presto query submission flow.


26-28: LGTM! Proper memoization with correct dependencies.

The useCallback hook correctly memoizes the click handler with queryString as a dependency, preventing unnecessary re-renders while ensuring the handler uses the current query string.


38-38: LGTM! onClick handler properly wired.

The button's onClick event is correctly connected to the memoized handleClick function.

Note: The error handling concern from previous reviews about user-friendly error feedback still applies to the handlePrestoQuerySubmit function in the imported module.

components/webui/server/src/schemas/presto-search.ts (1)

1-23: LGTM! Well-structured schema definitions.

The schema definitions are clean and well-organized:

  • Proper use of TypeBox for runtime validation
  • Clear separation between creation and identification schemas
  • Good reuse of common StringSchema
  • Comprehensive documentation
components/webui/server/src/plugins/app/Presto.ts (3)

1-8: LGTM! Clean imports and configuration loading.

The import structure is well-organized, correctly importing the necessary Presto client types and using the new JSON import syntax with type assertion.


13-22: Simple and effective Presto client wrapper.

The Presto class provides a clean abstraction around the Presto client with proper type safety and readonly access to the client instance.


24-28: Proper Fastify module augmentation.

The module declaration correctly extends the FastifyInstance interface to include the optional Presto property, following Fastify plugin patterns.

components/webui/server/src/routes/api/presto-search/index.ts (3)

1-8: LGTM! Proper imports and schema usage.

The imports are well-structured, correctly bringing in Fastify types, HTTP status codes, and the necessary schemas for validation.


26-37: LGTM! Well-defined route schema.

The route configuration properly defines the schema with appropriate request/response validation and OpenAPI tags.


84-87: LGTM! Proper response handling.

The response correctly sets the HTTP status code and returns the expected payload structure.

Comment on lines 49 to 51
// eslint-disable-next-line no-warning-comments
// TODO: Data, error, and success handlers are dummy implementations
// and should be completed.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick (assertive)

Remove outdated TODO comment.

The TODO comment about dummy implementations should be removed since the handlers are now properly implemented.

-                        // eslint-disable-next-line no-warning-comments
-                        // TODO: Data, error, and success handlers are dummy implementations
-                        // and should be completed.
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
// eslint-disable-next-line no-warning-comments
// TODO: Data, error, and success handlers are dummy implementations
// and should be completed.
request.log.info({
error: error,
searchJobId: newSearchJobId,
state: stats.state,
}, "Presto search state updated");
success: () => {
request.log.info("Presto search succeeded");
resolve(searchJobId);
},
🤖 Prompt for AI Agents
In components/webui/server/src/routes/api/presto-search/index.ts around lines 49
to 51, remove the outdated TODO comment that states the data, error, and success
handlers are dummy implementations, as these handlers have now been properly
implemented and the comment is no longer relevant.

Copy link
Contributor

@davemarco davemarco left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did some refactoring such as

  • creating a seperate plugin for presto
  • moved the query submit logic into presto-search-requests.ts to be more similiar to native ui
  • Restructured route code to have better error handling

@davemarco davemarco requested a review from junhaoliao July 31, 2025 19:39
Copy link
Member

@junhaoliao junhaoliao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

didn't test but the code lgtm. @hoophalab please do a final quick look

@davemarco
Copy link
Contributor

davemarco commented Aug 4, 2025

@davemarco, after experimenting with presto-client-node, I feel we'll still need a PrestoSearchManager for handling cancel requests.

There is a kill api no? Like the client just sends back the id, and we kill the query

Copy link
Contributor Author

@hoophalab hoophalab left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

Validations:

  1. Executed SELECT * FROM tpch.sf100.customer limit 10 in the Presto search webui and verified that the data appeared correctly in the server's console.

  2. Executed SELECT * FROM tpch.sf100.customer and verified that the data streamed as intended to the server's console.

@hoophalab
Copy link
Contributor Author

@davemarco, after experimenting with presto-client-node, I feel we'll still need a PrestoSearchManager for handling cancel requests.

There is a kill api no? Like the client just sends back the id, and we kill the query

I was thinking when the user sends an ID to cancel a query, we need to tell presto-client-node to stop it. Based on my previous research, this can be only done by returning true in the cancel callback.

This means we'll need a map to link search job IDs to their cancellation status. But storing state in server's memory might not be ideal for failure recovery or out-of-memory issues.

However, we should be fine with merely storing ephemeral search job ids. So, let's proceed with that approach.

@davemarco
Copy link
Contributor

@davemarco davemarco requested a review from junhaoliao August 4, 2025 19:06
@hoophalab
Copy link
Contributor Author

@hoophalab - so your saying we cant just use this https://github.com/tagomoris/presto-client-node?tab=readme-ov-file#killquery_id-callback?

I didn't notice this function before. This function looks correct and we can use it.

Copy link
Member

@kirkrodrigues kirkrodrigues left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deferring to @hoophalab and @junhaoliao's reviews.

@hoophalab hoophalab dismissed junhaoliao’s stale review August 4, 2025 20:57

changes have already been applied

@hoophalab hoophalab merged commit 51f1277 into y-scope:main Aug 4, 2025
7 checks passed
Comment on lines +21 to +23
"ClpQueryEngine": "native",
"PrestoHost": "localhost",
"PrestoPort": 8889
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should also configure these in server_settings_json_updates in components/clp-package-utils/clp_package_utils/scripts/start_clp.py

@coderabbitai create an issue to track this

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧩 Analysis chain

I'll examine the current structure of the start_clp.py file and then create an issue to track this configuration work.


🏁 Script executed:

#!/bin/bash
# Examine the start_clp.py file to understand the server_settings_json_updates structure
cat components/clp-package-utils/clp_package_utils/scripts/start_clp.py | grep -A 20 -B 5 "server_settings_json_updates"

Length of output: 2869


Now I'll create a GitHub issue to track this configuration work.


🏁 Script executed:

#!/bin/bash
# Create a GitHub issue to track the Presto settings configuration in start_clp.py
gh issue create \
  --title "Configure Presto settings in start_clp.py server_settings_json_updates" \
  --body "## Description

The recent addition of Presto SQL query support in PR #1127 introduced new configuration settings in \`components/webui/server/settings.json\`:

- \`ClpQueryEngine\`: \"native\"
- \`PrestoHost\`: \"localhost\"  
- \`PrestoPort\`: 8889

These settings need to be properly configured in the \`server_settings_json_updates\` dictionary in \`components/clp-package-utils/clp_package_utils/scripts/start_clp.py\` to ensure consistency between the webui server configuration and the CLP startup script.

## Current Status

The settings are currently hardcoded in \`settings.json\` but are not dynamically configured through the startup script's configuration management system.

## Expected Behavior

The Presto-related settings should be configurable through the CLP configuration system and properly injected into the webui server settings during startup, similar to how other settings like database and MongoDB configurations are handled.

## References

- PR: https://github.com/y-scope/clp/pull/1127
- Comment: https://github.com/y-scope/clp/pull/1127#discussion_r2296622851
- Requested by: @junhaoliao" \
  --assignee junhaoliao

Length of output: 1275


@junhaoliao I've created issue #1260 to track the configuration of the new Presto settings in start_clp.py.

The issue documents the need to add the three new settings (ClpQueryEngine, PrestoHost, and PrestoPort) to the server_settings_json_updates dictionary so they can be properly configured through the CLP configuration system rather than being hardcoded in settings.json.


🧠 Learnings used
Learnt from: junhaoliao
PR: y-scope/clp#1152
File: components/clp-package-utils/clp_package_utils/scripts/start_clp.py:613-613
Timestamp: 2025-08-08T06:59:42.436Z
Learning: In components/clp-package-utils/clp_package_utils/scripts/start_clp.py, generic_start_scheduler sets CLP_LOGGING_LEVEL using clp_config.query_scheduler.logging_level for both schedulers; compression scheduler should use its own logging level. Tracking via an issue created from PR #1152 discussion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants